profile query fix to return the correct user avatar not the first found

This commit is contained in:
Ulf Gebhardt 2023-07-17 18:24:31 +02:00
parent ae0b7f7629
commit c24a9a56c2
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -22,7 +22,7 @@ type Room {
avatar: String @cypher(statement: """
MATCH (this)<-[:CHATS_IN]-(user:User)
WHERE NOT user.id = $cypherParams.currentUserId
OPTIONAL MATCH (:User)-[:AVATAR_IMAGE]->(image:Image)
OPTIONAL MATCH (user:User)-[:AVATAR_IMAGE]->(image:Image)
RETURN image.url
""")