fix(backend): user role in group in notifications (#8552)

Co-authored-by: Max <maxharz@gmail.com>
This commit is contained in:
Moriz Wahl 2025-05-20 08:54:10 +02:00 committed by GitHub
parent a9ac75cf0c
commit 35729dfb6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,7 +54,7 @@ export default {
MATCH (resource {deleted: false, disabled: false})-[notification:NOTIFIED]->(user:User {id:$id})
${whereClause}
OPTIONAL MATCH (relatedUser:User { id: notification.relatedUserId })
OPTIONAL MATCH (resource)<-[membership:MEMBER_OF]-(relatedUser)
OPTIONAL MATCH (resource)<-[membership:MEMBER_OF]-(user)
WITH user, notification, resource, membership, relatedUser,
[(resource)<-[:WROTE]-(author:User) | author {.*}] AS authors,
[(resource)-[:COMMENTS]->(post:Post)<-[:WROTE]-(author:User) | post {.*, author: properties(author), postType: [l IN labels(post) WHERE NOT l = 'Post']} ] AS posts