diff options
author | Vitaly Takmazov | 2019-04-04 20:42:36 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2019-04-04 20:42:36 +0300 |
commit | a410f8fe72aa38ea02a877890511a15f608245cb (patch) | |
tree | 7c2e863b1a91bca21a01cbc2f9e890e8d24d32fb /src/main/java/com/juick/service | |
parent | 0ea0026b4ac5a26b2312e329476a632548ad5fee (diff) |
Avatars in feed recommendations
Diffstat (limited to 'src/main/java/com/juick/service')
-rw-r--r-- | src/main/java/com/juick/service/MessagesServiceImpl.java | 3 |
1 files changed, 2 insertions, 1 deletions
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<Pair<Integer, User>> allRecommendations = getMessagesRecommendations(mids); msgs.forEach(m -> { - m.setRecommendations(new HashSet<User>(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; |