From 88a0d25218bc3f3263d3d734c265c32f8a8a6a8b Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sun, 4 Jul 2010 19:38:33 +0100 Subject: mod_bosh: Add jabber:client namespace to stanzas with no namespace --- plugins/mod_bosh.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index 66a79785..e03b2bbd 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -190,6 +190,11 @@ function stream_callbacks.streamopened(request, attr) local r, send_buffer = session.requests, session.send_buffer; local response = { headers = default_headers } function session.send(s) + -- We need to ensure that outgoing stanzas have the jabber:client xmlns + if s.attr and not s.attr.xmlns then + s = st.clone(s); + s.attr.xmlns = "jabber:client"; + end --log("debug", "Sending BOSH data: %s", tostring(s)); local oldest_request = r[1]; if oldest_request then -- cgit v1.2.3