aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-05-25 21:54:46 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-05-25 21:54:46 +0200
commitc65c3148017a9d46e683458394f3b88a10745cda (patch)
treef15f3d0ea3504a5217b4bf8631b57053cd27f378
parent79796b00799bd491dbdb7363919a52da9d27356c (diff)
only subscribe to omemo pep events if omemo is enabled
-rw-r--r--src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java b/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java
index 4be6c621..9e839683 100644
--- a/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java
+++ b/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java
@@ -12,6 +12,7 @@ import java.util.List;
import java.util.Locale;
import java.util.TimeZone;
+import eu.siacs.conversations.Config;
import eu.siacs.conversations.crypto.axolotl.AxolotlService;
import eu.siacs.conversations.services.XmppConnectionService;
import eu.siacs.conversations.utils.PhoneHelper;
@@ -32,8 +33,7 @@ public abstract class AbstractGenerator {
"http://jabber.org/protocol/nick+notify",
"urn:xmpp:ping",
"jabber:iq:version",
- "http://jabber.org/protocol/chatstates",
- AxolotlService.PEP_DEVICE_LIST_NOTIFY};
+ "http://jabber.org/protocol/chatstates"};
private final String[] MESSAGE_CONFIRMATION_FEATURES = {
"urn:xmpp:chat-markers:0",
"urn:xmpp:receipts"
@@ -95,6 +95,9 @@ public abstract class AbstractGenerator {
if (mXmppConnectionService.allowMessageCorrection()) {
features.addAll(Arrays.asList(MESSAGE_CORRECTION_FEATURES));
}
+ if (Config.supportOmemo()) {
+ features.add(AxolotlService.PEP_DEVICE_LIST_NOTIFY);
+ }
Collections.sort(features);
return features;
}