aboutsummaryrefslogtreecommitdiff
path: root/juick-server
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server')
-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