X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2Fmod_component.lua;h=69a42eaf8b80404759f8c2632acffd7e6a0d9d21;hb=049dddf5d1b9fbf49dfce0f24413501d22633be5;hp=fa2c166fb0b7198d1fd493fd71cfd357f7f409da;hpb=ebcbfbabc892d64d01f9eab69394437a7b9ba857;p=prosody.git diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua index fa2c166f..69a42eaf 100644 --- a/plugins/mod_component.lua +++ b/plugins/mod_component.lua @@ -1,4 +1,4 @@ --- Prosody IM v0.4 +-- Prosody IM -- Copyright (C) 2008-2009 Matthew Wild -- Copyright (C) 2008-2009 Waqas Hussain -- @@ -64,7 +64,12 @@ function handle_component_auth(session, stanza) -- If component not already created for this host, create one now if not hosts[session.host].connected then local send = session.send; - session.component_session = cm_register_component(session.host, function (_, data) return send(data); end); + session.component_session = cm_register_component(session.host, function (_, data) + if data.attr and data.attr.xmlns == "jabber:client" then + data.attr.xmlns = nil; + end + return send(data); + end); hosts[session.host].connected = true; log("info", "Component successfully registered"); else