评论功能消息通知完善

This commit is contained in:
x ronger 2020-03-08 01:09:42 +08:00
parent a21339d68d
commit 40cedf40e0

View File

@ -90,7 +90,7 @@ public class CommentServiceImpl extends AbstractService<Comment> implements Comm
String commentPreviewContent = commentContent.substring(0,length); String commentPreviewContent = commentContent.substring(0,length);
commentContent = Html2TextUtil.getContent(commentPreviewContent); commentContent = Html2TextUtil.getContent(commentPreviewContent);
// 评论者不是作者本人则进行消息通知 // 评论者不是作者本人则进行消息通知
if (article.getArticleAuthorId().equals(comment.getCommentAuthorId())) { if (!article.getArticleAuthorId().equals(comment.getCommentAuthorId())) {
NotificationUtils.saveNotification(article.getArticleAuthorId(),comment.getIdComment(), NotificationConstant.Comment, commentContent); NotificationUtils.saveNotification(article.getArticleAuthorId(),comment.getIdComment(), NotificationConstant.Comment, commentContent);
} }
// 判断是否是回复消息 // 判断是否是回复消息