aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/CommandsManager.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-04-26 17:29:25 +0300
committerGravatar Vitaly Takmazov2019-04-26 17:29:25 +0300
commit1b5d8ba596869e7321dd7a0f4757d08306a4d9fd (patch)
tree5c2ec24ecd1f15fa01618d2938d55e3df6b01f76 /src/main/java/com/juick/server/CommandsManager.java
parenta34350b62784d4332243ba40ffe928afd91f67d3 (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.java2
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)));