diff options
author | Vitaly Takmazov | 2018-04-04 22:20:52 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-04-04 22:20:52 +0300 |
commit | 71c29cc99d1b3f71247b81bc42d30f8b52dad240 (patch) | |
tree | d859abf882d2a40e5130fbb210ab3dea8d582d42 /juick-server-xmpp/src/main/java/com/juick | |
parent | f86e3e089ff4e4e27133156e277c94d4cd8c7111 (diff) |
server: PMs in email
* also introduces MessageUtils.isReply and MessageUtils.isPM
Diffstat (limited to 'juick-server-xmpp/src/main/java/com/juick')
-rw-r--r-- | juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java | 6 |
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 { |