mirror of
https://github.com/wassname/talk.git
synced 2026-09-11 12:51:33 +08:00
added USERS_NEW event to SSE bus
This commit is contained in:
@@ -44,7 +44,7 @@ module.exports = class CommentsService {
|
||||
const savedCommentModel = await commentModel.save();
|
||||
|
||||
// Emit that the comment was created!
|
||||
await events.emitAsync(COMMENTS_NEW, savedCommentModel);
|
||||
events.emit(COMMENTS_NEW, savedCommentModel);
|
||||
|
||||
return savedCommentModel;
|
||||
}
|
||||
@@ -193,7 +193,7 @@ module.exports = class CommentsService {
|
||||
}
|
||||
}
|
||||
|
||||
await events.emitAsync(COMMENTS_EDIT, originalComment, editedComment);
|
||||
events.emit(COMMENTS_EDIT, originalComment, editedComment);
|
||||
|
||||
return editedComment;
|
||||
}
|
||||
@@ -305,7 +305,7 @@ module.exports = class CommentsService {
|
||||
|
||||
// Emit that the comment was edited, and pass the original comment and the
|
||||
// edited comment.
|
||||
await events.emitAsync(COMMENTS_EDIT, originalComment, editedComment);
|
||||
events.emit(COMMENTS_EDIT, originalComment, editedComment);
|
||||
|
||||
return editedComment;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user