aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-01-11 11:29:09 +0300
committerGravatar Vitaly Takmazov2018-01-11 11:29:09 +0300
commit76d4f5c19b6da9ac330921bad4c27fb3228329c5 (patch)
tree744ee6baf71774393b40ed745812f560d3121442 /juick-www/src/main/java
parent449a1b5634127d47bfdd8ff5c98b99eac8541e73 (diff)
www: do not show reply button when any user is in bl
Diffstat (limited to 'juick-www/src/main/java')
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/Messages.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/Messages.java b/juick-www/src/main/java/com/juick/www/controllers/Messages.java
index 39e88b12..5a76256e 100644
--- a/juick-www/src/main/java/com/juick/www/controllers/Messages.java
+++ b/juick-www/src/main/java/com/juick/www/controllers/Messages.java
@@ -515,7 +515,7 @@ public class Messages {
fillUserModel(model, user, visitor);
if (visitor.getUid() > 0) {
boolean isMsgAuthor = visitor.getUid() == msg.getUser().getUid();
- boolean isInBL = userService.isInBL(msg.getUser().getUid(), visitor.getUid());
+ boolean isInBL = userService.isInBLAny(msg.getUser().getUid(), visitor.getUid());
msg.VisitorCanComment = isMsgAuthor || !(msg.ReadOnly || isInBL);
}
model.addAttribute("msg", msg);
@@ -604,8 +604,8 @@ public class Messages {
if (visitor.getUid() > 0) {
boolean isMsgAuthor = visitor.getUid() == msg.getUser().getUid();
boolean isReplyAuthor = visitor.getUid() == reply.getUser().getUid();
- BooleanSupplier isInBL2 = () -> userService.checkBL(visitor.getUid(), blUIDs).contains(reply.getUser().getUid());
- reply.VisitorCanComment = isMsgAuthor || (!msg.ReadOnly && (isReplyAuthor || !isInBL2.getAsBoolean()));
+ reply.VisitorCanComment = isMsgAuthor || (!msg.ReadOnly
+ && (isReplyAuthor || !userService.isInBLAny(visitor.getUid(), reply.getUser().getUid())));
}
}