aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-06-18 21:38:01 +0300
committerGravatar Vitaly Takmazov2018-06-18 21:38:01 +0300
commit08afd2fc05170f5f3240c3f383174ebd525d876f (patch)
tree4eb204b629e269d07835ca2526b3c088da8bea93 /juick-server/src/main
parent095cbbffde0c73df0a9c1562e30a1d76436195d3 (diff)
api: recommendations list
Diffstat (limited to 'juick-server/src/main')
-rw-r--r--juick-server/src/main/java/com/juick/server/api/Messages.java2
1 files changed, 2 insertions, 0 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 e100802f..35b7e6b2 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
@@ -37,6 +37,7 @@ import org.springframework.web.bind.annotation.*;
import javax.inject.Inject;
import java.io.IOException;
import java.util.Collections;
+import java.util.HashSet;
import java.util.List;
import java.util.Objects;
@@ -149,6 +150,7 @@ public class Messages {
if (!messagesService.canViewThread(mid, visitor.getUid())) {
return FORBIDDEN;
} else {
+ msg.setRecommendations(new HashSet<>(messagesService.getMessageRecommendations(msg.getMid())));
List<com.juick.Message> replies = messagesService.getReplies(visitor, mid);
if (!visitor.isAnonymous()) {
applicationEventPublisher.publishEvent(new MessageReadEvent(this, visitor, msg));