aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/api
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/api')
-rw-r--r--juick-server/src/main/java/com/juick/server/api/Messages.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/Messages.java b/juick-server/src/main/java/com/juick/server/api/Messages.java
index 80c718b7..2b171489 100644
--- a/juick-server/src/main/java/com/juick/server/api/Messages.java
+++ b/juick-server/src/main/java/com/juick/server/api/Messages.java
@@ -169,8 +169,7 @@ public class Messages {
if (!messagesService.canViewThread(mid, visitor.getUid())) {
return FORBIDDEN;
} else {
- JuickUser juickUser = new JuickUser(userService.getUserByName(msg.getUser().getName()));
- if (!juickUser.isEnabled()) {
+ if (userService.getUserByName(msg.getUser().getName()).isBanned()) {
throw new HttpNotFoundException();
}
msg.setRecommendations(new HashSet<>(messagesService.getMessageRecommendations(msg.getMid())));