hotfix: try catch hasUnreadAntenna

This commit is contained in:
Kainoa Kanter 2023-05-26 16:32:59 +00:00
parent fdd299f5dd
commit fdf2cb6d23

View file

@ -256,6 +256,7 @@ export const UserRepository = db.getRepository(User).extend({
},
async getHasUnreadAntenna(userId: User["id"]): Promise<boolean> {
try {
const myAntennas = (await getAntennas()).filter((a) => a.userId === userId);
const unread =
@ -266,7 +267,7 @@ export const UserRepository = db.getRepository(User).extend({
})
: null;
return unread != null;
return unread != null; } catch(e) { return false; }
},
async getHasUnreadChannel(userId: User["id"]): Promise<boolean> {