xmpp-compliance-tester

XMPP Compliance Tester, forked from github.com/iNPUTmice/ComplianceTester
git clone https://git.in0rdr.ch/xmpp-compliance-tester.git
Log | Files | Refs | Pull requests |Archive | README | LICENSE

commit cdc96cf2a0c764ce584b3199199b38ec42deae25
parent ccf1250b74e39193d7af7df54ef3a242bd05df1f
Author: Daniel Gultsch <daniel@gultsch.de>
Date:   Tue, 19 Dec 2017 14:04:31 +0100

modified omemo test to check for accept omemo_all_access instead of publish_options

Diffstat:
Mpom.xml | 2+-
Msrc/main/java/eu/siacs/compliance/tests/OMEMO.java | 8+++++++-
2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml @@ -6,7 +6,7 @@ <groupId>eu.siacs</groupId> <artifactId>ComplianceTester</artifactId> - <version>0.2.1</version> + <version>0.2.2</version> <packaging>jar</packaging> <dependencies> diff --git a/src/main/java/eu/siacs/compliance/tests/OMEMO.java b/src/main/java/eu/siacs/compliance/tests/OMEMO.java @@ -7,6 +7,8 @@ import rocks.xmpp.extensions.disco.model.info.Identity; import rocks.xmpp.extensions.disco.model.info.InfoNode; import rocks.xmpp.util.concurrent.AsyncResult; +import java.util.Arrays; +import java.util.Set; import java.util.concurrent.TimeUnit; /** @@ -17,6 +19,9 @@ import java.util.concurrent.TimeUnit; */ public class OMEMO extends AbstractTest { + private static final String PUBLISH_OPTIONS = "http://jabber.org/protocol/pubsub#publish-options"; + private static final String WHITELISTED = "eu.siacs.conversations.axolotl.whitelisted"; + public OMEMO(XmppClient client) { super(client); } @@ -27,7 +32,8 @@ public class OMEMO extends AbstractTest { AsyncResult<InfoNode> result = manager.discoverInformation(client.getConnectedResource().asBareJid()); try { final InfoNode infoNode = result.get(10, TimeUnit.SECONDS); - if (!infoNode.getFeatures().contains("http://jabber.org/protocol/pubsub#publish-options")) { + final Set<String> features = infoNode.getFeatures(); + if (!features.contains(PUBLISH_OPTIONS) && !features.contains(WHITELISTED)) { return Result.FAILED; } for (Identity identity : infoNode.getIdentities()) {