From 2ab4bed9aa1d3142e95f6861871097626e5958c1 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 17 Jan 2017 16:51:47 +0300 Subject: juick-server: fix user existence check --- juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'juick-server/src/main/java/com') 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 e800df09e..19275b366 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 mids = messagesService.getUserBlog(blogUser.getUid(), 0, page); List messages = messagesService.getMessages(mids); return new ProtocolReply(String.format("Last messages from @%s:\n%s", arguments[0], -- cgit v1.2.3