aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-07-17 09:49:38 +0300
committerGravatar Vitaly Takmazov2018-07-17 09:49:38 +0300
commit84afbbaf9554b4ddf83ee47d1b511cd7ec8b97ca (patch)
treeba64d55b3d61bd2d4fbf3a93a8a7cdbdc4488a47 /juick-server/src/main
parent9bef658175f4210c0c6234aadfa60a5acb42d38c (diff)
xmpp: enable receipts
Diffstat (limited to 'juick-server/src/main')
-rw-r--r--juick-server/src/main/java/com/juick/server/XMPPConnection.java6
1 files changed, 6 insertions, 0 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 2ffd18bc..cbc4d54b 100644
--- a/juick-server/src/main/java/com/juick/server/XMPPConnection.java
+++ b/juick-server/src/main/java/com/juick/server/XMPPConnection.java
@@ -43,12 +43,14 @@ import rocks.xmpp.core.stanza.model.*;
import rocks.xmpp.core.stanza.model.client.ClientMessage;
import rocks.xmpp.core.stanza.model.client.ClientPresence;
import rocks.xmpp.core.stanza.model.errors.Condition;
+import rocks.xmpp.extensions.caps.EntityCapabilitiesManager;
import rocks.xmpp.extensions.component.accept.ExternalComponent;
import rocks.xmpp.extensions.filetransfer.FileTransfer;
import rocks.xmpp.extensions.filetransfer.FileTransferManager;
import rocks.xmpp.extensions.nick.model.Nickname;
import rocks.xmpp.extensions.oob.model.x.OobX;
import rocks.xmpp.extensions.ping.PingManager;
+import rocks.xmpp.extensions.receipts.MessageDeliveryReceiptsManager;
import rocks.xmpp.extensions.vcard.temp.model.VCard;
import rocks.xmpp.extensions.version.SoftwareVersionManager;
import rocks.xmpp.extensions.version.model.SoftwareVersion;
@@ -124,6 +126,10 @@ public class XMPPConnection implements StanzaListener, NotificationListener {
xmpp.addStanzaListener(this);
router = ExternalComponent.create(componentName, password, session.getConfiguration(), "localhost",
componentPort);
+ EntityCapabilitiesManager entityCapabilitiesManager = router.getManager(EntityCapabilitiesManager.class);
+ entityCapabilitiesManager.setNode("https://juick.com/caps");
+ MessageDeliveryReceiptsManager messageDeliveryReceiptsManager = router.getManager(MessageDeliveryReceiptsManager.class);
+ messageDeliveryReceiptsManager.setEnabled(true);
PingManager pingManager = router.getManager(PingManager.class);
pingManager.setEnabled(true);
SoftwareVersionManager softwareVersionManager = router.getManager(SoftwareVersionManager.class);