diff options
author | Vitaly Takmazov | 2019-04-26 17:29:25 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2019-04-26 17:29:25 +0300 |
commit | 1b5d8ba596869e7321dd7a0f4757d08306a4d9fd (patch) | |
tree | 5c2ec24ecd1f15fa01618d2938d55e3df6b01f76 /src/main/java/com/juick/server/CommandsManager.java | |
parent | a34350b62784d4332243ba40ffe928afd91f67d3 (diff) |
Minimize SQL queries for banned users
Diffstat (limited to 'src/main/java/com/juick/server/CommandsManager.java')
-rw-r--r-- | src/main/java/com/juick/server/CommandsManager.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/juick/server/CommandsManager.java b/src/main/java/com/juick/server/CommandsManager.java index fdea0d83..634deb35 100644 --- a/src/main/java/com/juick/server/CommandsManager.java +++ b/src/main/java/com/juick/server/CommandsManager.java @@ -410,7 +410,7 @@ public class CommandsManager { public CommandResult commandUser(User user, URI attachment, String... arguments) { User blogUser = userService.getUserByName(arguments[0]); int page = arguments[1].length(); - if (!blogUser.isAnonymous()) { + if (!blogUser.isAnonymous() && !blogUser.isBanned()) { List<Integer> mids = messagesService.getUserBlog(blogUser.getUid(), 0, 0); return CommandResult.fromString(String.format("Last messages from @%s:\n%s", arguments[0], printMessages(user, mids, false))); |