diff --git a/backend/src/middleware/notifications/notificationsMiddleware.js b/backend/src/middleware/notifications/notificationsMiddleware.js index 3d6d13790..564ddc370 100644 --- a/backend/src/middleware/notifications/notificationsMiddleware.js +++ b/backend/src/middleware/notifications/notificationsMiddleware.js @@ -100,7 +100,8 @@ const notifyUsers = async (label, id, idsOfUsers, reason, context) => { const handleContentDataOfPost = async (resolve, root, args, context, resolveInfo) => { const idsOfUsers = extractMentionedUsers(args.content) const post = await resolve(root, args, context, resolveInfo) - if (post) return notifyUsers('Post', post.id, idsOfUsers, 'mentioned_in_post', context) + if (post) await notifyUsers('Post', post.id, idsOfUsers, 'mentioned_in_post', context) + return post } const handleContentDataOfComment = async (resolve, root, args, context, resolveInfo) => {