mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
Prevent getting notifications from yourself
This commit is contained in:
parent
325ecbfc53
commit
372a209d32
|
|
@ -90,7 +90,7 @@ export default apiRoute<typeof meta, typeof schema>(
|
||||||
// @ts-expect-error Yes I KNOW the types are wrong
|
// @ts-expect-error Yes I KNOW the types are wrong
|
||||||
notification,
|
notification,
|
||||||
// @ts-expect-error Yes I KNOW the types are wrong
|
// @ts-expect-error Yes I KNOW the types are wrong
|
||||||
{ lt, gte, gt, and, or, eq, inArray, sql },
|
{ lt, gte, gt, and, or, eq, not },
|
||||||
) =>
|
) =>
|
||||||
or(
|
or(
|
||||||
and(
|
and(
|
||||||
|
|
@ -106,6 +106,7 @@ export default apiRoute<typeof meta, typeof schema>(
|
||||||
),
|
),
|
||||||
eq(notification.notifiedId, user.id),
|
eq(notification.notifiedId, user.id),
|
||||||
eq(notification.accountId, account_id),
|
eq(notification.accountId, account_id),
|
||||||
|
not(eq(notification.accountId, user.id)),
|
||||||
),
|
),
|
||||||
limit,
|
limit,
|
||||||
// @ts-expect-error Yes I KNOW the types are wrong
|
// @ts-expect-error Yes I KNOW the types are wrong
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue