diff --git a/backend/src/middleware/handleHtmlContent/handleContentData.js b/backend/src/middleware/handleHtmlContent/handleContentData.js index 6fdd5e27d..ab0456f9a 100644 --- a/backend/src/middleware/handleHtmlContent/handleContentData.js +++ b/backend/src/middleware/handleHtmlContent/handleContentData.js @@ -7,13 +7,13 @@ const notifyMentions = async (label, id, idsOfMentionedUsers, context) => { const session = context.driver.session() const createdAt = new Date().toISOString() const cypher = ` - MATCH (source) + MATCH (source) WHERE source.id = $id AND $label IN LABELS(source) - MATCH(source)<-[:WROTE]-(author:User) - MATCH(u:User) + MATCH (source)<-[:WROTE]-(author: User) + MATCH (u: User) WHERE u.id in $idsOfMentionedUsers AND NOT (u)<-[:BLOCKED]-(author) - CREATE(n:Notification{id: apoc.create.uuid(), read: false, createdAt: $createdAt}) + CREATE (n: Notification {id: apoc.create.uuid(), read: false, createdAt: $createdAt }) MERGE (source)-[:NOTIFIED]->(n)-[:NOTIFIED]->(u) ` await session.run(cypher, { diff --git a/backend/src/schema/types/type/Notification.gql b/backend/src/schema/types/type/Notification.gql index e4bc16fec..0f94c2301 100644 --- a/backend/src/schema/types/type/Notification.gql +++ b/backend/src/schema/types/type/Notification.gql @@ -3,5 +3,6 @@ type Notification { read: Boolean user: User @relation(name: "NOTIFIED", direction: "OUT") post: Post @relation(name: "NOTIFIED", direction: "IN") + comment: Comment @relation(name: "NOTIFIED", direction: "IN") createdAt: String } diff --git a/webapp/components/Editor/Editor.vue b/webapp/components/Editor/Editor.vue index 063e6df75..d0a434ef0 100644 --- a/webapp/components/Editor/Editor.vue +++ b/webapp/components/Editor/Editor.vue @@ -18,7 +18,9 @@