diff options
Diffstat (limited to 'juick-server/src/main/java/com/juick/server')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/Messages.java | 2 | ||||
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/Users.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/Messages.java b/juick-server/src/main/java/com/juick/server/api/Messages.java index db6463dd..80c718b7 100644 --- a/juick-server/src/main/java/com/juick/server/api/Messages.java +++ b/juick-server/src/main/java/com/juick/server/api/Messages.java @@ -100,7 +100,7 @@ public class Messages { List<Integer> mids; if (!StringUtils.isEmpty(uname)) { User user = userService.getUserByName(uname); - if (user != null) { + if (!user.isAnonymous()) { if (!StringUtils.isEmpty(media)) { mids = messagesService.getUserPhotos(user.getUid(), 0, before); } else if (!StringUtils.isEmpty(tag)) { diff --git a/juick-server/src/main/java/com/juick/server/api/Users.java b/juick-server/src/main/java/com/juick/server/api/Users.java index c91581a0..237b7ed6 100644 --- a/juick-server/src/main/java/com/juick/server/api/Users.java +++ b/juick-server/src/main/java/com/juick/server/api/Users.java @@ -106,7 +106,7 @@ public class Users { } else { if (WebUtils.isUserName(uname)) { com.juick.User u = userService.getUserByName(uname); - if (u != null && u.getUid() > 0) { + if (!u.isAnonymous()) { uid = u.getUid(); } } @@ -131,7 +131,7 @@ public class Users { } else { if (WebUtils.isUserName(uname)) { com.juick.User u = userService.getUserByName(uname); - if (u != null && u.getUid() > 0) { + if (!u.isAnonymous()) { uid = u.getUid(); } } |