272 if handlers then |
272 if handlers then |
273 log("debug", "Passing stanza to mod_%s", handler_info[handlers[1]].name); |
273 log("debug", "Passing stanza to mod_%s", handler_info[handlers[1]].name); |
274 (handlers[1])(origin, stanza); |
274 (handlers[1])(origin, stanza); |
275 return true; |
275 return true; |
276 else |
276 else |
277 if stanza.attr.xmlns == "jabber:client" then |
277 if stanza.attr.xmlns == nil then |
278 log("debug", "Unhandled %s stanza: %s; xmlns=%s", origin.type, stanza.name, xmlns); -- we didn't handle it |
278 log("debug", "Unhandled %s stanza: %s; xmlns=%s", origin.type, stanza.name, xmlns); -- we didn't handle it |
279 if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then |
279 if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then |
280 origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); |
280 origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); |
281 end |
281 end |
282 elseif not((name == "features" or name == "error") and xmlns == "http://etherx.jabber.org/streams") then -- FIXME remove check once we handle S2S features |
282 elseif not((name == "features" or name == "error") and xmlns == "http://etherx.jabber.org/streams") then -- FIXME remove check once we handle S2S features |