From 9c645f58d9e0d3689333c8d53fb1d880b11f6c6a Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 1 Mar 2019 22:43:38 +0300 Subject: Avatars in recommendations --- src/main/java/com/juick/server/api/Messages.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/java/com/juick/server/api') diff --git a/src/main/java/com/juick/server/api/Messages.java b/src/main/java/com/juick/server/api/Messages.java index e105890f..5c791df4 100644 --- a/src/main/java/com/juick/server/api/Messages.java +++ b/src/main/java/com/juick/server/api/Messages.java @@ -179,6 +179,9 @@ public class Messages { } msg.getUser().setAvatar(webApp.getAvatarUrl(msg.getUser())); msg.setRecommendations(new HashSet<>(messagesService.getMessageRecommendations(msg.getMid()))); + msg.getRecommendations().forEach(r -> { + r.setAvatar(webApp.getAvatarUrl(r)); + }); List replies = messagesService.getReplies(visitor, mid); replies.forEach(m -> m.getUser().setAvatar(webApp.getAvatarUrl(m.getUser()))); if (!visitor.isAnonymous()) { -- cgit v1.2.3