diff --git a/backend/src/schema/types/type/Room.gql b/backend/src/schema/types/type/Room.gql index 2ffbc2b96..3e3d28338 100644 --- a/backend/src/schema/types/type/Room.gql +++ b/backend/src/schema/types/type/Room.gql @@ -19,7 +19,12 @@ type Room { roomId: String! @cypher(statement: "RETURN this.id") roomName: String! @cypher(statement: "MATCH (this)<-[:CHATS_IN]-(user:User) WHERE NOT user.id = $cypherParams.currentUserId RETURN user.name") - avatar: String! @cypher(statement: "MATCH (this)<-[:CHATS_IN]-(user:User) WHERE NOT user.id = $cypherParams.currentUserId RETURN user.avatar.url") + avatar: String @cypher(statement: """ + MATCH (this)<-[:CHATS_IN]-(user:User) + WHERE NOT user.id = $cypherParams.currentUserId + OPTIONAL MATCH (:User)-[:AVATAR_IMAGE]->(image:Image) + RETURN image.url + """) lastMessageAt: String diff --git a/webapp/components/Chat/Chat.vue b/webapp/components/Chat/Chat.vue index 88d0b811c..0ec77a9c5 100644 --- a/webapp/components/Chat/Chat.vue +++ b/webapp/components/Chat/Chat.vue @@ -61,7 +61,7 @@