From a1f9fe5ea28ec28d7cda704d8ef79ca2bd890195 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 18 Oct 2018 12:45:58 +0300 Subject: last message in pm groups --- juick-server/src/main/java/com/juick/server/api/PM.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'juick-server/src/main/java/com/juick/server') 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 lastconv = pmQueriesService.getPMLastConversationsUsers(visitor.getUid(), cnt); + List lastconv = pmQueriesService.getLastChats(visitor); PrivateChats pms = new PrivateChats(); pms.setUsers(lastconv); return pms; -- cgit v1.2.3