mirror of
https://github.com/wassname/talk.git
synced 2026-07-27 11:28:12 +08:00
Add some comments
This commit is contained in:
@@ -130,6 +130,8 @@ function getReactionConfig(reaction) {
|
||||
const response = Comments.get.load(item_id).then((comment) => {
|
||||
return Action.create({item_id, item_type: 'COMMENTS', action_type: REACTION})
|
||||
.then((action) => {
|
||||
|
||||
// The comment is needed to allow better filtering e.g. by asset_id.
|
||||
pubsub.publish(`${reaction}ActionCreated`, {action, comment});
|
||||
return Promise.resolve(action);
|
||||
});
|
||||
@@ -140,6 +142,8 @@ function getReactionConfig(reaction) {
|
||||
const response = Action.delete({id})
|
||||
.then((action) => {
|
||||
return Comments.get.load(action.item_id).then((comment) => {
|
||||
|
||||
// The comment is needed to allow better filtering e.g. by asset_id.
|
||||
pubsub.publish(`${reaction}ActionDeleted`, {action, comment});
|
||||
return Promise.resolve(action);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user