From a125a8d20c8a95bc877e14716318d6df08622af5 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 20 Jan 2019 16:10:07 +0300 Subject: Do not overwrite user avatar url in reply --- src/main/java/com/juick/server/ServerManager.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/main/java/com/juick/server/ServerManager.java b/src/main/java/com/juick/server/ServerManager.java index 5f96da08..4ea290fc 100644 --- a/src/main/java/com/juick/server/ServerManager.java +++ b/src/main/java/com/juick/server/ServerManager.java @@ -98,11 +98,10 @@ public class ServerManager implements NotificationListener { } else { // to get quote and attachment Message op = messagesService.getMessage(jmsg.getMid()).orElseThrow(IllegalStateException::new); - com.juick.Message reply = messagesService.getReply(jmsg.getMid(), jmsg.getRid()); - subscriptionService.getUsersSubscribedToComments(op, reply, true).stream() - .filter(u -> userService.isReplyToBL(u, reply)) - .forEach(b -> messagesService.setLastReadComment(b, reply.getMid(), reply.getRid())); - onJuickMessageReply(reply, subscribedUsers); + subscriptionService.getUsersSubscribedToComments(op, jmsg, true).stream() + .filter(u -> userService.isReplyToBL(u, jmsg)) + .forEach(b -> messagesService.setLastReadComment(b, jmsg.getMid(), jmsg.getRid())); + onJuickMessageReply(jmsg, subscribedUsers); } messageEvent(jmsg, Collections.singletonList(serviceUser)); } -- cgit v1.2.3