diff options
author | Vitaly Takmazov | 2018-10-18 12:45:58 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-10-18 12:45:58 +0300 |
commit | a1f9fe5ea28ec28d7cda704d8ef79ca2bd890195 (patch) | |
tree | 04475b630931d61d1fff0b9f455ad51bfc09c0fa /juick-server/src/main/java/com/juick/server/api | |
parent | 4c3dbf0fbe903cd9d4b6c54a20958e56e1a77a4d (diff) |
last message in pm groups
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/api')
-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; |