diff options
Diffstat (limited to 'src/main/java/com/juick/server/api/Messages.java')
-rw-r--r-- | src/main/java/com/juick/server/api/Messages.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main/java/com/juick/server/api/Messages.java b/src/main/java/com/juick/server/api/Messages.java index 60e05d6d..402d2162 100644 --- a/src/main/java/com/juick/server/api/Messages.java +++ b/src/main/java/com/juick/server/api/Messages.java @@ -106,7 +106,7 @@ public class Messages { List<Integer> mids; if (!StringUtils.isEmpty(uname)) { User user = userService.getUserByName(uname); - if (!user.isAnonymous()) { + if (!user.isAnonymous() && !user.isBanned()) { if (!StringUtils.isEmpty(media)) { mids = messagesService.getUserPhotos(user.getUid(), 0, before); } else if (!StringUtils.isEmpty(tag)) { @@ -180,9 +180,6 @@ public class Messages { if (!messagesService.canViewThread(mid, visitor.getUid())) { return FORBIDDEN; } else { - if (userService.getUserByName(msg.getUser().getName()).isBanned()) { - throw new HttpNotFoundException(); - } msg.getUser().setAvatar(webApp.getAvatarUrl(msg.getUser())); msg.setRecommendations(new HashSet<>(messagesService.getMessagesRecommendations( Collections.singletonList(msg.getMid())) |