aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xmpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/xmpp')
-rw-r--r--src/eu/siacs/conversations/xmpp/XmppConnection.java3
-rw-r--r--src/eu/siacs/conversations/xmpp/stanzas/streammgmt/EnablePacket.java6
2 files changed, 8 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java
index 01a024dc..e50ccd05 100644
--- a/src/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -583,7 +583,8 @@ public class XmppConnection implements Runnable {
.getContent().split("/")[1];
account.setResource(resource);
if (streamFeatures.hasChild("sm")) {
- EnablePacket enable = new EnablePacket();
+ String xmlns = streamFeatures.findChild("sm").getAttribute("xmlns");
+ EnablePacket enable = new EnablePacket(xmlns);
tagWriter.writeStanzaAsync(enable);
}
sendInitialPresence();
diff --git a/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/EnablePacket.java b/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/EnablePacket.java
index ae6a513a..f6a0adb2 100644
--- a/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/EnablePacket.java
+++ b/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/EnablePacket.java
@@ -9,5 +9,11 @@ public class EnablePacket extends AbstractStanza {
this.setAttribute("xmlns","urn:xmpp:sm:3");
this.setAttribute("resume", "true");
}
+
+ public EnablePacket(String xmlns) {
+ super("enable");
+ this.setAttribute("xmlns",xmlns);
+ this.setAttribute("resume", "true");
+ }
}