From a410f8fe72aa38ea02a877890511a15f608245cb Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 4 Apr 2019 20:42:36 +0300 Subject: Avatars in feed recommendations --- src/main/java/com/juick/service/MessagesServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/com/juick/service/MessagesServiceImpl.java b/src/main/java/com/juick/service/MessagesServiceImpl.java index 2ec78494..def6324a 100644 --- a/src/main/java/com/juick/service/MessagesServiceImpl.java +++ b/src/main/java/com/juick/service/MessagesServiceImpl.java @@ -915,8 +915,9 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ List> allRecommendations = getMessagesRecommendations(mids); msgs.forEach(m -> { - m.setRecommendations(new HashSet(allRecommendations.stream() + m.setRecommendations(new HashSet<>(allRecommendations.stream() .filter(r -> r.getLeft().equals(m.getMid())).map(Pair::getRight).collect(Collectors.toList()))); + m.getRecommendations().forEach(r -> r.setAvatar(webApp.getAvatarUrl(r))); }); return msgs; -- cgit v1.2.3