Comparison

core/stanza_router.lua @ 6663:d3023dd07cb6

portmanager, s2smanager, sessionmanager, stanza_router, storagemanager, usermanager, util.xml: Add luacheck annotations
author Matthew Wild <mwild1@gmail.com>
date Wed, 06 May 2015 19:20:07 +0100
parent 6559:0ef7ca5276a1
child 7448:34678ce8a6ac
comparison
equal deleted inserted replaced
6662:5ef319efedba 6663:d3023dd07cb6
28 deprecated_warning"core_post_stanza"; 28 deprecated_warning"core_post_stanza";
29 deprecated_warning"core_process_stanza"; 29 deprecated_warning"core_process_stanza";
30 deprecated_warning"core_route_stanza"; 30 deprecated_warning"core_route_stanza";
31 31
32 local valid_stanzas = { message = true, presence = true, iq = true }; 32 local valid_stanzas = { message = true, presence = true, iq = true };
33 local function handle_unhandled_stanza(host, origin, stanza) 33 local function handle_unhandled_stanza(host, origin, stanza) --luacheck: ignore 212/host
34 local name, xmlns, origin_type = stanza.name, stanza.attr.xmlns or "jabber:client", origin.type; 34 local name, xmlns, origin_type = stanza.name, stanza.attr.xmlns or "jabber:client", origin.type;
35 if xmlns == "jabber:client" and valid_stanzas[name] then 35 if xmlns == "jabber:client" and valid_stanzas[name] then
36 -- A normal stanza 36 -- A normal stanza
37 local st_type = stanza.attr.type; 37 local st_type = stanza.attr.type;
38 if st_type == "error" or (name == "iq" and st_type == "result") then 38 if st_type == "error" or (name == "iq" and st_type == "result") then
219 core_route_stanza(host_session, st.error_reply(stanza, "cancel", "not-allowed", "Communication with remote domains is not enabled")); 219 core_route_stanza(host_session, st.error_reply(stanza, "cancel", "not-allowed", "Communication with remote domains is not enabled"));
220 end 220 end
221 end 221 end
222 end 222 end
223 end 223 end
224
225 --luacheck: ignore 122/prosody
224 prosody.core_process_stanza = core_process_stanza; 226 prosody.core_process_stanza = core_process_stanza;
225 prosody.core_post_stanza = core_post_stanza; 227 prosody.core_post_stanza = core_post_stanza;
226 prosody.core_route_stanza = core_route_stanza; 228 prosody.core_route_stanza = core_route_stanza;