diff options
Diffstat (limited to 'src/main/java/com/juick/server/www')
-rw-r--r-- | src/main/java/com/juick/server/www/controllers/MessagesWWW.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/juick/server/www/controllers/MessagesWWW.java b/src/main/java/com/juick/server/www/controllers/MessagesWWW.java index 41c95dcb..e1c1bed8 100644 --- a/src/main/java/com/juick/server/www/controllers/MessagesWWW.java +++ b/src/main/java/com/juick/server/www/controllers/MessagesWWW.java @@ -224,7 +224,7 @@ public class MessagesWWW { if (paramTag == null) { throw new HttpNotFoundException(); } else if (!paramTag.getName().equals(paramTagStr)) { - String url = user.getName() + "/?tag=" + URLEncoder.encode(paramTag.getName(), CharEncoding.UTF_8); + String url = user.getName() + "/?tag=" + URLEncoder.encode(paramTag.getName(), StandardCharsets.UTF_8); return "redirect:/" + url; } } @@ -510,7 +510,7 @@ public class MessagesWWW { visitor.setAvatar(webApp.getAvatarWebPath(visitor)); Optional<com.juick.Message> message = messagesService.getMessage(mid); - if (!message.isPresent() || message.get().getUser().isBanned()) { + if (message.isEmpty()) { throw new HttpNotFoundException(); } |