use of org.moera.node.model.event.CommentDeletedEvent in project moera-node by MoeraOrg.
the class CommentReceptor method deleted.
@LiberinMapping
public void deleted(CommentDeletedLiberin liberin) {
Comment comment = liberin.getComment();
Posting posting = comment.getPosting();
notifyReplyDeleted(posting, comment);
notifyMentioned(posting, comment.getId(), comment.getOwnerName(), comment.getOwnerFullName(), new AvatarImage(comment.getOwnerAvatarMediaFile(), comment.getOwnerAvatarShape()), null, liberin.getLatestRevision());
send(Directions.postingSubscribers(comment.getNodeId(), posting.getId()), new PostingCommentsUpdatedNotification(posting.getId(), posting.getTotalChildren()));
send(Directions.postingCommentsSubscribers(comment.getNodeId(), posting.getId()), new PostingCommentDeletedNotification(posting.getId(), comment.getId(), comment.getOwnerName(), comment.getOwnerFullName(), new AvatarImage(comment.getOwnerAvatarMediaFile(), comment.getOwnerAvatarShape())));
send(liberin, new CommentDeletedEvent(comment));
send(liberin, new PostingCommentsChangedEvent(posting));
}
Aggregations