mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 18:07:31 -07:00
hotfix: try catch hasUnreadAntenna
This commit is contained in:
parent
fdd299f5dd
commit
fdf2cb6d23
1 changed files with 3 additions and 2 deletions
|
@ -256,6 +256,7 @@ export const UserRepository = db.getRepository(User).extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
async getHasUnreadAntenna(userId: User["id"]): Promise<boolean> {
|
async getHasUnreadAntenna(userId: User["id"]): Promise<boolean> {
|
||||||
|
try {
|
||||||
const myAntennas = (await getAntennas()).filter((a) => a.userId === userId);
|
const myAntennas = (await getAntennas()).filter((a) => a.userId === userId);
|
||||||
|
|
||||||
const unread =
|
const unread =
|
||||||
|
@ -266,7 +267,7 @@ export const UserRepository = db.getRepository(User).extend({
|
||||||
})
|
})
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
return unread != null;
|
return unread != null; } catch(e) { return false; }
|
||||||
},
|
},
|
||||||
|
|
||||||
async getHasUnreadChannel(userId: User["id"]): Promise<boolean> {
|
async getHasUnreadChannel(userId: User["id"]): Promise<boolean> {
|
||||||
|
|
Loading…
Reference in a new issue