Live update modqueue on new comments

This commit is contained in:
Chi Vinh Le
2017-09-21 23:39:04 +07:00
parent abdb4cbe3e
commit 143adc7c6f
9 changed files with 225 additions and 74 deletions
+3 -3
View File
@@ -182,11 +182,11 @@ const createComment = async (context, {tags = [], body, asset_id, parent_id = nu
Comments.parentCountByAssetID.incr(asset_id);
}
Comments.countByAssetID.incr(asset_id);
// Publish the newly added comment via the subscription.
pubsub.publish('commentAdded', comment);
}
// Publish the newly added comment via the subscription.
pubsub.publish('commentAdded', comment);
return comment;
};