aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-04-04 20:42:36 +0300
committerGravatar Vitaly Takmazov2019-04-04 20:42:36 +0300
commita410f8fe72aa38ea02a877890511a15f608245cb (patch)
tree7c2e863b1a91bca21a01cbc2f9e890e8d24d32fb /src/main/java
parent0ea0026b4ac5a26b2312e329476a632548ad5fee (diff)
Avatars in feed recommendations
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/juick/service/MessagesServiceImpl.java3
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;