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/parser/PresenceParser.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 'src/main/java/de/thedevstack/conversationsplus/parser/PresenceParser.java')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/parser/PresenceParser.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/parser/PresenceParser.java b/src/main/java/de/thedevstack/conversationsplus/parser/PresenceParser.java index 5270eefe..ed366a2c 100644 --- a/src/main/java/de/thedevstack/conversationsplus/parser/PresenceParser.java +++ b/src/main/java/de/thedevstack/conversationsplus/parser/PresenceParser.java @@ -28,6 +28,7 @@ import de.thedevstack.conversationsplus.xmpp.OnPresencePacketReceived; import de.thedevstack.conversationsplus.xmpp.avatar.AvatarVcardParser; import de.thedevstack.conversationsplus.xmpp.jid.Jid; import de.thedevstack.conversationsplus.dto.Avatar; +import de.thedevstack.conversationsplus.xmpp.openpgp.OpenPgpXep; import de.thedevstack.conversationsplus.xmpp.stanzas.PresencePacket; public class PresenceParser extends AbstractParser implements @@ -91,7 +92,7 @@ public class PresenceParser extends AbstractParser implements mucOptions.addUser(user); } if (mXmppConnectionService.getPgpEngine() != null) { - Element signed = packet.findChild("x", "jabber:x:signed"); + Element signed = packet.findChild(OpenPgpXep.SIGNED_ELEMENT, OpenPgpXep.SIGNED_NAMESPACE); if (signed != null) { Element status = packet.findChild("status"); String msg = status == null ? "" : status.getContent(); @@ -213,7 +214,7 @@ public class PresenceParser extends AbstractParser implements } PgpEngine pgp = mXmppConnectionService.getPgpEngine(); - Element x = packet.findChild("x", "jabber:x:signed"); + Element x = packet.findChild(OpenPgpXep.SIGNED_ELEMENT, OpenPgpXep.SIGNED_NAMESPACE); if (pgp != null && x != null) { Element status = packet.findChild("status"); String msg = status != null ? status.getContent() : ""; |