aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-07-17 22:51:40 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-07-17 22:51:40 +0200
commit2843a0af2646322e5ce7c5fc237d417d7db86fa8 (patch)
treee2eef7069e1cde8d2646ddd5f4e8434a97d6146a
parente90e333f292301c1b46237a72756ab0eeabce52e (diff)
announce OTR support as per XEP-0378
-rw-r--r--src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java b/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java
index cdc3840f..c3be07bb 100644
--- a/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java
+++ b/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java
@@ -45,6 +45,9 @@ public abstract class AbstractGenerator {
private final String[] PRIVACY_SENSITIVE = {
"urn:xmpp:time" //XEP-0202: Entity Time leaks time zone
};
+ private final String[] OTR = {
+ "urn:xmpp:otr:0"
+ };
private String mVersion = null;
protected final String IDENTITY_NAME = "Conversations";
protected final String IDENTITY_TYPE = "phone";
@@ -105,6 +108,9 @@ public abstract class AbstractGenerator {
if (!mXmppConnectionService.useTorToConnect()) {
features.addAll(Arrays.asList(PRIVACY_SENSITIVE));
}
+ if (Config.supportOtr()) {
+ features.addAll(Arrays.asList(OTR));
+ }
Collections.sort(features);
return features;
}