plugins/mod_websocket.lua
changeset 10101 1f45d316b222
parent 9810 b72d2f4153f7
parent 10096 4b3c129e96f2
child 10115 0f335815244f
equal deleted inserted replaced
10100:46a7792fdac5 10101:1f45d316b222
   270 		end
   270 		end
   271 		return t_concat(cache, "");
   271 		return t_concat(cache, "");
   272 	end);
   272 	end);
   273 
   273 
   274 	add_filter(session, "stanzas/out", function(stanza)
   274 	add_filter(session, "stanzas/out", function(stanza)
       
   275 		stanza = st.clone(stanza);
   275 		local attr = stanza.attr;
   276 		local attr = stanza.attr;
   276 		attr.xmlns = attr.xmlns or xmlns_client;
   277 		attr.xmlns = attr.xmlns or xmlns_client;
   277 		if stanza.name:find("^stream:") then
   278 		if stanza.name:find("^stream:") then
   278 			attr["xmlns:stream"] = attr["xmlns:stream"] or xmlns_streams;
   279 			attr["xmlns:stream"] = attr["xmlns:stream"] or xmlns_streams;
   279 		end
   280 		end