diff options
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/generator/PresenceGenerator.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/generator/PresenceGenerator.java b/src/eu/siacs/conversations/generator/PresenceGenerator.java index a301392ec..b34315681 100644 --- a/src/eu/siacs/conversations/generator/PresenceGenerator.java +++ b/src/eu/siacs/conversations/generator/PresenceGenerator.java @@ -2,9 +2,10 @@ package eu.siacs.conversations.generator; import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Contact; +import eu.siacs.conversations.xml.Element; import eu.siacs.conversations.xmpp.stanzas.PresencePacket; -public class PresenceGenerator { +public class PresenceGenerator extends AbstractGenerator { private PresencePacket subscription(String type, Contact contact) { PresencePacket packet = new PresencePacket(); @@ -38,6 +39,13 @@ public class PresenceGenerator { packet.addChild("status").setContent("online"); packet.addChild("x", "jabber:x:signed").setContent(sig); } + String capHash = getCapHash(); + if (capHash != null) { + Element cap = packet.addChild("c","http://jabber.org/protocol/caps"); + cap.setAttribute("hash", "sha-1"); + cap.setAttribute("node","http://conversions.siacs.eu"); + cap.setAttribute("ver", capHash); + } return packet; } }
\ No newline at end of file |