From b88ad5617bb037ff0124d4dc9f3cc320444b4afc Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Thu, 3 Apr 2025 00:42:25 +0200 Subject: [PATCH] respect user email notification settings --- backend/src/middleware/notifications/notificationsMiddleware.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/middleware/notifications/notificationsMiddleware.ts b/backend/src/middleware/notifications/notificationsMiddleware.ts index 798b48337..a17196996 100644 --- a/backend/src/middleware/notifications/notificationsMiddleware.ts +++ b/backend/src/middleware/notifications/notificationsMiddleware.ts @@ -322,6 +322,7 @@ const handleCreateMessage = async (resolve, root, args, context, resolveInfo) => MATCH (room)<-[:CHATS_IN]-(recipientUser:User)-[:PRIMARY_EMAIL]->(emailAddress:EmailAddress) WHERE NOT recipientUser.id = $currentUserId AND NOT (recipientUser)-[:BLOCKED]-(currentUser) + AND recipientUser.sendNotificationEmails = true RETURN recipientUser, emailAddress {.email} ` const txResponse = await transaction.run(messageRecipientCypher, {