From b54b4ca78a85055292ea54b5acfaaec25c43f412 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 17 Sep 2015 14:42:50 +0200 Subject: [PATCH] introduced Config variable to use legacy namespace for http upload --- src/main/java/eu/siacs/conversations/Config.java | 2 ++ src/main/java/eu/siacs/conversations/utils/Xmlns.java | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/Config.java b/src/main/java/eu/siacs/conversations/Config.java index 6b57f7ea..b4dcf209 100644 --- a/src/main/java/eu/siacs/conversations/Config.java +++ b/src/main/java/eu/siacs/conversations/Config.java @@ -13,6 +13,8 @@ public final class Config { public static final boolean DISALLOW_REGISTRATION_IN_UI = false; //hide the register checkbox public static final boolean HIDE_PGP_IN_UI = false; //some more consumer focused clients might want to disable OpenPGP + public static final boolean LEGACY_NAMESPACE_HTTP_UPLOAD = false; + public static final int PING_MAX_INTERVAL = 300; public static final int PING_MIN_INTERVAL = 30; public static final int PING_TIMEOUT = 15; diff --git a/src/main/java/eu/siacs/conversations/utils/Xmlns.java b/src/main/java/eu/siacs/conversations/utils/Xmlns.java index de0a29ce..a19ec791 100644 --- a/src/main/java/eu/siacs/conversations/utils/Xmlns.java +++ b/src/main/java/eu/siacs/conversations/utils/Xmlns.java @@ -1,9 +1,11 @@ package eu.siacs.conversations.utils; +import eu.siacs.conversations.Config; + public final class Xmlns { public static final String BLOCKING = "urn:xmpp:blocking"; public static final String ROSTER = "jabber:iq:roster"; public static final String REGISTER = "jabber:iq:register"; public static final String BYTE_STREAMS = "http://jabber.org/protocol/bytestreams"; - public static final String HTTP_UPLOAD = "urn:xmpp:http:upload"; + public static final String HTTP_UPLOAD = Config.LEGACY_NAMESPACE_HTTP_UPLOAD ? "eu:siacs:conversations:http:upload" : "urn:xmpp:http:upload"; }