diff --git a/lib/webPush.js b/lib/webPush.js index d28ab8bb..c697afd5 100644 --- a/lib/webPush.js +++ b/lib/webPush.js @@ -259,7 +259,7 @@ export const notifyItemParents = async ({ models, item }) => { ) AND EXISTS ( -- check that there is at least one parent subscribed to this thread - SELECT 1 FROM "ThreadSubscription" ts WHERE p.id = ts."itemId" + SELECT 1 FROM "ThreadSubscription" ts WHERE p.id = ts."itemId" AND p."userId" = ts."userId" )` await Promise.allSettled( parents.map(({ userId, isDirect }) => {