fixed removing original post's user

This commit is contained in:
Kapil Jain 2019-10-29 14:20:51 -04:00
parent 06514eb535
commit aecc21890e

View File

@ -106,15 +106,13 @@ const handleContentDataOfComment = async (resolve, root, args, context, resolveI
const [postAuthor] = await result.records.map(record => {
return record.get('user')
})
const idsOfUsersExcludingPostAuthor = idsOfUsers.filter(res => !res.equals([postAuthor]))
cosole.log('idsOfUsers1')
await notifyUsers(
'Comment',
comment.id,
idsOfUsersExcludingPostAuthor,
'mentioned_in_comment',
context,
)
var index = idsOfUsers.indexOf(postAuthor.id)
if (index > -1) {
idsOfUsers.splice(index)
}
await notifyUsers('Comment', comment.id, idsOfUsers, 'mentioned_in_comment', context)
}
return comment