aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-03-26 12:40:46 +0300
committerGravatar Vitaly Takmazov2018-03-26 12:40:46 +0300
commitd5c174d374f22dd55e4aecc5da76b13d6a8c5dd8 (patch)
treee0d657e01ecf5e60920d25e26272762d141a5ed3 /juick-server/src/main/java/com/juick
parent2d272dfe5ee86229f27d7d2afe96af3985c8a33e (diff)
server: fix likes from www
Diffstat (limited to 'juick-server/src/main/java/com/juick')
-rw-r--r--juick-server/src/main/java/com/juick/server/XMPPConnection.java5
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