From d5c174d374f22dd55e4aecc5da76b13d6a8c5dd8 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 26 Mar 2018 12:40:46 +0300 Subject: server: fix likes from www --- juick-server/src/main/java/com/juick/server/XMPPConnection.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'juick-server/src/main/java/com/juick/server') diff --git a/juick-server/src/main/java/com/juick/server/XMPPConnection.java b/juick-server/src/main/java/com/juick/server/XMPPConnection.java index d50c4400..db1775ac 100644 --- a/juick-server/src/main/java/com/juick/server/XMPPConnection.java +++ b/juick-server/src/main/java/com/juick/server/XMPPConnection.java @@ -163,8 +163,9 @@ public class XMPPConnection implements AutoCloseable { if (jmsg != null) { if (jid.getLocal().equals("recomm")) { sendJuickRecommendation(jmsg); - User fromUser = userService.getUserByJID(message.getFrom().asBareJid().toEscapedString()); - applicationEventPublisher.publishEvent(new LikeEvent(this, fromUser, jmsg)); + User fromUser = jmsg.getUser(); + com.juick.Message msg = messagesService.getMessage(jmsg.getMid()); + applicationEventPublisher.publishEvent(new LikeEvent(this, fromUser, msg)); } else { if (jmsg.getRid() > 0) { // to get quote and attachment -- cgit v1.2.3