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/PM.java | 10 |
1 files changed, 3 insertions, 7 deletions
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 80be92f0..0c36fe00 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 @@ -17,6 +17,7 @@ package com.juick.server.api; +import com.juick.Chat; import com.juick.User; import com.juick.service.component.MessageEvent; import com.juick.model.AnonymousUser; @@ -105,14 +106,9 @@ public class PM { if (visitor.isAnonymous()) { throw new HttpForbiddenException(); } - if (cnt < 3) { - cnt = 3; - } - if (cnt > 10) { - cnt = 10; - } + // TODO: ignore cnt param for now but make sure paging param will not be cnt - List<User> lastconv = pmQueriesService.getPMLastConversationsUsers(visitor.getUid(), cnt); + List<Chat> lastconv = pmQueriesService.getLastChats(visitor); PrivateChats pms = new PrivateChats(); pms.setUsers(lastconv); return pms; |