From 4dd8d7cdc8fa783b19b481057b1e009084708e22 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 29 Jun 2022 02:06:52 +0300 Subject: Avatars in /thread API endpoint --- src/main/java/com/juick/service/MessagesServiceImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/juick/service') diff --git a/src/main/java/com/juick/service/MessagesServiceImpl.java b/src/main/java/com/juick/service/MessagesServiceImpl.java index e54c23cb..130779af 100644 --- a/src/main/java/com/juick/service/MessagesServiceImpl.java +++ b/src/main/java/com/juick/service/MessagesServiceImpl.java @@ -878,7 +878,10 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ if (replies.size() > 0 && !user.isAnonymous()) { setRead(user, mid); } - replies.forEach(i -> i.setEntities(MessageUtils.getEntities(i))); + replies.forEach(i -> { + i.setEntities(MessageUtils.getEntities(i)); + i.getUser().setAvatar(webApp.getAvatarWebPath(i.getUser())); + }); return replies; } -- cgit v1.2.3