From 33221c57f9bf46484612f49ccbb1c375a4a13bf2 Mon Sep 17 00:00:00 2001 From: Mohsen Hariri Date: Mon, 2 Jul 2018 11:50:58 +0200 Subject: [PATCH] Fix missing body namespace in BOSH messages The body's "jabber:client" namespace was missing in BOSH messages. --- .../java/org/jivesoftware/smack/bosh/XMPPBOSHConnection.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/smack-bosh/src/main/java/org/jivesoftware/smack/bosh/XMPPBOSHConnection.java b/smack-bosh/src/main/java/org/jivesoftware/smack/bosh/XMPPBOSHConnection.java index 907d7be6f..756c2d885 100644 --- a/smack-bosh/src/main/java/org/jivesoftware/smack/bosh/XMPPBOSHConnection.java +++ b/smack-bosh/src/main/java/org/jivesoftware/smack/bosh/XMPPBOSHConnection.java @@ -39,7 +39,6 @@ import org.jivesoftware.smack.packet.Nonza; import org.jivesoftware.smack.packet.Presence; import org.jivesoftware.smack.packet.Stanza; import org.jivesoftware.smack.packet.StanzaError; -import org.jivesoftware.smack.packet.StreamOpen; import org.jivesoftware.smack.sasl.packet.SaslStreamElements.SASLFailure; import org.jivesoftware.smack.sasl.packet.SaslStreamElements.Success; import org.jivesoftware.smack.util.PacketParserUtils; @@ -235,7 +234,7 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection { private void sendElement(Element element) { try { - send(ComposableBody.builder().setPayloadXML(element.toXML(StreamOpen.CLIENT_NAMESPACE).toString()).build()); + send(ComposableBody.builder().setPayloadXML(element.toXML(BOSH_URI).toString()).build()); if (element instanceof Stanza) { firePacketSendingListeners((Stanza) element); }