Fix notifications erroring in certain cases

This commit is contained in:
Jesse Wierzbinski 2024-04-14 03:12:39 -10:00
parent 55ea57391b
commit 76056f76d4
No known key found for this signature in database

View file

@ -99,7 +99,9 @@ export default apiRoute<typeof meta, typeof schema>(
: undefined,
min_id ? gt(notification.id, min_id) : undefined,
eq(notification.notifiedId, user.id),
eq(notification.accountId, account_id),
account_id
? eq(notification.accountId, account_id)
: undefined,
not(eq(notification.accountId, user.id)),
types
? inArray(notification.type, types)