aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--juick-server/src/main/java/com/juick/server/api/Messages.java6
-rw-r--r--juick-server/src/main/java/com/juick/server/api/PM.java9
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 36d3e1dd..69cf828c 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 045d465e..cbd70bed 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;
}
}