aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/xmpp
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-05-09 20:51:40 +0200
committerChristian Schneppe <christian@pix-art.de>2017-05-09 20:51:40 +0200
commitfff5ae880309d49b151d382f1efe2e93f4e251e6 (patch)
tree9327dbe2f15d6f875cfa62327d65d8036af42cf7 /src/main/java/de/pixart/messenger/xmpp
parentc0afad2fcd2be07834f64625204984879880afd5 (diff)
support for jingle ft:5
Diffstat (limited to 'src/main/java/de/pixart/messenger/xmpp')
-rw-r--r--src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java4
-rw-r--r--src/main/java/de/pixart/messenger/xmpp/jingle/stanzas/Content.java5
2 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java b/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java
index ff97732a3..1ca924834 100644
--- a/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java
+++ b/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java
@@ -305,7 +305,9 @@ public class JingleConnection implements Transferable {
ServiceDiscoveryResult result = presence != null ? presence.getServiceDiscoveryResult() : null;
if (result != null) {
List<String> features = result.getFeatures();
- if (features.contains(Content.Version.FT_4.getNamespace())) {
+ if (features.contains(Content.Version.FT_5.getNamespace())) {
+ this.ftVersion = Content.Version.FT_5;
+ } else if (features.contains(Content.Version.FT_4.getNamespace())) {
this.ftVersion = Content.Version.FT_4;
}
}
diff --git a/src/main/java/de/pixart/messenger/xmpp/jingle/stanzas/Content.java b/src/main/java/de/pixart/messenger/xmpp/jingle/stanzas/Content.java
index fc7231e30..d4220083e 100644
--- a/src/main/java/de/pixart/messenger/xmpp/jingle/stanzas/Content.java
+++ b/src/main/java/de/pixart/messenger/xmpp/jingle/stanzas/Content.java
@@ -7,7 +7,8 @@ public class Content extends Element {
public enum Version {
FT_3("urn:xmpp:jingle:apps:file-transfer:3"),
- FT_4("urn:xmpp:jingle:apps:file-transfer:4");
+ FT_4("urn:xmpp:jingle:apps:file-transfer:4"),
+ FT_5("urn:xmpp:jingle:apps:file-transfer:5");
private final String namespace;
@@ -37,6 +38,8 @@ public class Content extends Element {
return Version.FT_3;
} else if (hasChild("description", Version.FT_4.namespace)) {
return Version.FT_4;
+ } else if (hasChild("description", Version.FT_5.namespace)) {
+ return Version.FT_5;
}
return null;
}