diff --git a/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java b/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java index aff2ce48b..6db39cdec 100644 --- a/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java +++ b/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java @@ -25,6 +25,7 @@ public abstract class AbstractGenerator { "urn:xmpp:jingle:1", Content.Version.FT_3.getNamespace(), Content.Version.FT_4.getNamespace(), + Content.Version.FT_5.getNamespace(), "urn:xmpp:jingle:transports:s5b:1", "urn:xmpp:jingle:transports:ibb:1", "http://jabber.org/protocol/muc", diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java index a7bb66978..44faaca87 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java @@ -302,7 +302,9 @@ public class JingleConnection implements Transferable { ServiceDiscoveryResult result = presence != null ? presence.getServiceDiscoveryResult() : null; if (result != null) { List 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/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java index 49f52bf33..12ea69991 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java +++ b/src/main/java/eu/siacs/conversations/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; }