aboutsummaryrefslogtreecommitdiff
path: root/juick-server-xmpp/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server-xmpp/src/main/java')
-rw-r--r--juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java6
1 files changed, 4 insertions, 2 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 3538077a..04c3e2ab 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
@@ -191,7 +191,6 @@ public class XMPPConnection implements StanzaListener, NotificationListener {
if (jmsg.getRid() > 0) {
// to get quote and attachment
com.juick.Message reply = messagesService.getReply(jmsg.getMid(), jmsg.getRid());
- sendJuickComment(reply);
applicationEventPublisher.publishEvent(new MessageEvent(this, reply));
} else if (jmsg.getMid() > 0) {
sendJuickMessage(jmsg);
@@ -412,7 +411,10 @@ public class XMPPConnection implements StanzaListener, NotificationListener {
}
s2s(ClientMessage.from(mm));
});
- } else if (!isReply) {
+ } else if (isReply) {
+ sendJuickComment(msg);
+ }
+ else {
String notify = "New message posted.\n#" + msg.getMid() + " https://juick.com/" + msg.getMid();
userService.getJIDsbyUID(msg.getUser().getUid())
.forEach(jid -> sendReply(Jid.of(jid), notify));