57 session.component_validate_from = module:get_option_boolean("validate_from_addresses") ~= false; |
57 session.component_validate_from = module:get_option_boolean("validate_from_addresses") ~= false; |
58 |
58 |
59 -- If component not already created for this host, create one now |
59 -- If component not already created for this host, create one now |
60 if not hosts[session.host].connected then |
60 if not hosts[session.host].connected then |
61 local send = session.send; |
61 local send = session.send; |
62 session.component_session = cm_register_component(session.host, function (_, data) |
62 session.component_session = cm_register_component(session.host, function (_, data) |
63 if data.attr and data.attr.xmlns == "jabber:client" then |
63 if data.attr and data.attr.xmlns == "jabber:client" then |
64 data.attr.xmlns = nil; |
64 data.attr.xmlns = nil; |
65 end |
65 end |
66 return send(data); |
66 return send(data); |
67 end); |
67 end); |