aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/protocol
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-01-17 16:51:47 +0300
committerGravatar Vitaly Takmazov2017-01-17 16:51:47 +0300
commit2ab4bed9aa1d3142e95f6861871097626e5958c1 (patch)
tree05a8baeb39dbd2b218e3dde72c1f352ae7f77f77 /juick-server/src/main/java/com/juick/server/protocol
parentac12981e84bd691e4a5f689d239cf4b935e0f643 (diff)
juick-server: fix user existence check
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/protocol')
-rw-r--r--juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java b/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java
index e800df09..19275b36 100644
--- a/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java
+++ b/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java
@@ -227,7 +227,7 @@ public class JuickProtocol {
public ProtocolReply commandUser(User user, String... arguments) {
User blogUser = userService.getUserByName(arguments[0]);
int page = arguments[1].length();
- if (blogUser != null) {
+ if (blogUser.getUid() > 0) {
List<Integer> mids = messagesService.getUserBlog(blogUser.getUid(), 0, page);
List<Message> messages = messagesService.getMessages(mids);
return new ProtocolReply(String.format("Last messages from @%s:\n%s", arguments[0],