mirror of
https://github.com/wassname/talk.git
synced 2026-10-01 12:42:56 +08:00
Subscribe to comments
This commit is contained in:
1 parent
3c96b7eb1e
commit
6b0cdae183
18 files changed
+418
-217
No files matched your search
@@ -340,6 +340,12 @@ const edit = async (context, {id, asset_id, edit: {body}}) => {
|
||||
// Execute the edit.
|
||||
const comment = await CommentsService.edit(id, context.user.id, {body, status});
|
||||
|
||||
if (context.pubsub) {
|
||||
|
||||
// Publish the edited comment via the subscription.
|
||||
context.pubsub.publish('commentEdited', comment);
|
||||
}
|
||||
|
||||
return comment;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user