From 971154ad03e8324324c48a24ce5091b8cd18d77d Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 19 Nov 2020 00:39:58 +0300 Subject: Display "reply" button to user when message author ignored him * user replies are still muted for author --- src/main/java/com/juick/www/controllers/Site.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/juick/www/controllers/Site.java b/src/main/java/com/juick/www/controllers/Site.java index 57115629..4aa82f1a 100644 --- a/src/main/java/com/juick/www/controllers/Site.java +++ b/src/main/java/com/juick/www/controllers/Site.java @@ -490,7 +490,7 @@ public class Site { List unread = messagesService.getUnread(visitor); visitor.setUnreadCount(unread.size()); boolean isMsgAuthor = visitor.getUid() == msg.getUser().getUid(); - boolean isInBL = userService.isInBLAny(msg.getUser().getUid(), visitor.getUid()); + boolean isInBL = userService.isInBL(visitor.getUid(), msg.getUser().getUid()); msg.VisitorCanComment = isMsgAuthor || !(msg.ReadOnly || isInBL); } model.addAttribute("msg", msg); @@ -549,7 +549,7 @@ public class Site { boolean isMsgAuthor = visitor.getUid() == msg.getUser().getUid(); boolean isReplyAuthor = visitor.getUid() == reply.getUser().getUid(); reply.VisitorCanComment = isMsgAuthor || (!msg.ReadOnly - && msg.VisitorCanComment && (isReplyAuthor || !userService.isInBLAny(visitor.getUid(), reply.getUser().getUid()))); + && msg.VisitorCanComment && (isReplyAuthor || !userService.isInBL(visitor.getUid(), reply.getUser().getUid()))); } } model.addAttribute("replies", replies); -- cgit v1.2.3