diff options
author | steckbrief <steckbrief@chefmail.de> | 2017-08-07 12:57:57 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2017-08-07 12:57:57 +0200 |
commit | a892bb6f1685b84b74ba37e5a6a24ee8fb45eee7 (patch) | |
tree | f6d8036841f961dd987c2fb48e41983b327be049 /src/main/java/de/thedevstack/conversationsplus/generator/PresenceGenerator.java | |
parent | be1992ce897d3b0551e545646a3e0f45cc6dd8c2 (diff) |
Simplifying introduction of new XEP implementations, implements FS#250 and FS#251 (Privacy and Security settings), refactoring of location of some interfaces
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/generator/PresenceGenerator.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/generator/PresenceGenerator.java b/src/main/java/de/thedevstack/conversationsplus/generator/PresenceGenerator.java index fbe7c911..bfede624 100644 --- a/src/main/java/de/thedevstack/conversationsplus/generator/PresenceGenerator.java +++ b/src/main/java/de/thedevstack/conversationsplus/generator/PresenceGenerator.java @@ -5,7 +5,9 @@ import de.thedevstack.conversationsplus.entities.Contact; import de.thedevstack.conversationsplus.entities.MucOptions; import de.thedevstack.conversationsplus.entities.Presence; import de.thedevstack.conversationsplus.xml.Element; +import de.thedevstack.conversationsplus.xmpp.disco.FeatureRegistry; import de.thedevstack.conversationsplus.xmpp.jid.Jid; +import de.thedevstack.conversationsplus.xmpp.openpgp.OpenPgpXep; import de.thedevstack.conversationsplus.xmpp.stanzas.PresencePacket; public class PresenceGenerator extends AbstractGenerator { @@ -54,9 +56,9 @@ public class PresenceGenerator extends AbstractGenerator { packet.setFrom(account.getJid()); String sig = account.getPgpSignature(); if (sig != null) { - packet.addChild("x", "jabber:x:signed").setContent(sig); + packet.addChild(OpenPgpXep.SIGNED_ELEMENT, OpenPgpXep.SIGNED_NAMESPACE).setContent(sig); } - String capHash = getCapHash(); + String capHash = FeatureRegistry.getCapHash(); if (capHash != null) { Element cap = packet.addChild("c", "http://jabber.org/protocol/caps"); @@ -97,7 +99,7 @@ public class PresenceGenerator extends AbstractGenerator { } String sig = account.getPgpSignature(); if (sig != null) { - packet.addChild("x", "jabber:x:signed").setContent(sig); + packet.addChild(OpenPgpXep.SIGNED_ELEMENT, OpenPgpXep.SIGNED_NAMESPACE).setContent(sig); } return packet; @@ -109,7 +111,7 @@ public class PresenceGenerator extends AbstractGenerator { String sig = account.getPgpSignature(); if (sig != null) { packet.addChild("status").setContent("online"); - packet.addChild("x", "jabber:x:signed").setContent(sig); + packet.addChild(OpenPgpXep.SIGNED_ELEMENT, OpenPgpXep.SIGNED_NAMESPACE).setContent(sig); } return packet; |