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 | 6 | ||||
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/PM.java | 9 |
2 files changed, 4 insertions, 11 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 36d3e1dde..69cf828ce 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 @@ -75,11 +75,7 @@ public class Messages { if (!visitor.isAnonymous()) { int vuid = visitor.getUid(); List<Integer> mids = messagesService.getMyFeed(vuid, before_mid, true); - - if (!mids.isEmpty()) - return ResponseEntity.ok(messagesService.getMessages(mids)); - - return NOT_FOUND; + return ResponseEntity.ok(messagesService.getMessages(mids)); } return FORBIDDEN; } diff --git a/juick-server/src/main/java/com/juick/server/api/PM.java b/juick-server/src/main/java/com/juick/server/api/PM.java index 045d465ef..cbd70bed2 100644 --- a/juick-server/src/main/java/com/juick/server/api/PM.java +++ b/juick-server/src/main/java/com/juick/server/api/PM.java @@ -113,11 +113,8 @@ public class PM { } List<User> lastconv = pmQueriesService.getPMLastConversationsUsers(visitor.getUid(), cnt); - if (lastconv != null && !lastconv.isEmpty()) { - PrivateChats pms = new PrivateChats(); - pms.setUsers(lastconv); - return pms; - } - throw new HttpNotFoundException(); + PrivateChats pms = new PrivateChats(); + pms.setUsers(lastconv); + return pms; } } |