From 84afbbaf9554b4ddf83ee47d1b511cd7ec8b97ca Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 17 Jul 2018 09:49:38 +0300 Subject: xmpp: enable receipts --- juick-server/src/main/java/com/juick/server/XMPPConnection.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'juick-server') 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); -- cgit v1.2.3