respect user email notification settings

This commit is contained in:
Ulf Gebhardt 2025-04-03 00:42:25 +02:00
parent cf059cd9d4
commit b88ad5617b
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -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, {