mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Update handleContentDataOfPost to return post
- fix tests, functionality
This commit is contained in:
parent
1827889582
commit
132951c525
@ -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) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user