diff options
author | Vitaly Takmazov | 2018-03-26 12:40:46 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-03-26 12:40:46 +0300 |
commit | d5c174d374f22dd55e4aecc5da76b13d6a8c5dd8 (patch) | |
tree | e0d657e01ecf5e60920d25e26272762d141a5ed3 | |
parent | 2d272dfe5ee86229f27d7d2afe96af3985c8a33e (diff) |
server: fix likes from www
-rw-r--r-- | juick-server/src/main/java/com/juick/server/XMPPConnection.java | 5 |
1 files changed, 3 insertions, 2 deletions
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 |