aboutsummaryrefslogtreecommitdiff
path: root/juick-server-xmpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server-xmpp/src')
-rw-r--r--juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java b/juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java
index f0c205d9..19fddd78 100644
--- a/juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java
+++ b/juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java
@@ -391,9 +391,7 @@ public class XMPPConnection implements StanzaListener, NotificationListener {
@Override
public void processMessageEvent(MessageEvent event) {
com.juick.Message msg = event.getMessage();
- boolean isPM = msg.getMid() == 0;
- boolean isReply = msg.getRid() > 0;
- if (isPM) {
+ if (MessageUtils.isPM(msg)) {
userService.getJIDsbyUID(msg.getTo().getUid())
.forEach(userJid -> {
Message mm = new Message();
@@ -409,7 +407,7 @@ public class XMPPConnection implements StanzaListener, NotificationListener {
}
router.send(ClientMessage.from(mm));
});
- } else if (isReply) {
+ } else if (MessageUtils.isReply(msg)) {
sendJuickComment(msg);
}
else {