Comparison

core/stanza_router.lua @ 12802:4a8740e01813

Merge 0.12->trunk
author Kim Alvefur <zash@zash.se>
date Mon, 12 Dec 2022 07:10:54 +0100
parent 12681:16ea01745dbe
child 12972:ead41e25ebc0
comparison
equal deleted inserted replaced
12801:ebd6b4d8bf04 12802:4a8740e01813
125 return; 125 return;
126 end 126 end
127 end 127 end
128 core_post_stanza(origin, stanza, origin.full_jid); 128 core_post_stanza(origin, stanza, origin.full_jid);
129 else 129 else
130 local h = hosts[stanza.attr.to or origin.host or origin.to_host]; 130 local h = hosts[stanza.attr.to or origin.host];
131 if h then 131 if h then
132 local event; 132 local event;
133 if xmlns == nil then 133 if xmlns == nil then
134 if stanza.name == "iq" and (stanza.attr.type == "set" or stanza.attr.type == "get") 134 if stanza.name == "iq" and (stanza.attr.type == "set" or stanza.attr.type == "get")
135 and stanza.tags[1] and stanza.tags[1].attr.xmlns then 135 and stanza.tags[1] and stanza.tags[1].attr.xmlns then
141 event = "stanza/"..xmlns..":"..stanza.name; 141 event = "stanza/"..xmlns..":"..stanza.name;
142 end 142 end
143 if h.events.fire_event(event, {origin = origin, stanza = stanza}) then return; end 143 if h.events.fire_event(event, {origin = origin, stanza = stanza}) then return; end
144 end 144 end
145 if host and not hosts[host] then host = nil; end -- COMPAT: workaround for a Pidgin bug which sets 'to' to the SRV result 145 if host and not hosts[host] then host = nil; end -- COMPAT: workaround for a Pidgin bug which sets 'to' to the SRV result
146 handle_unhandled_stanza(host or origin.host or origin.to_host, origin, stanza); 146 handle_unhandled_stanza(host or origin.host, origin, stanza);
147 end 147 end
148 end 148 end
149 149
150 function core_post_stanza(origin, stanza, preevents) 150 function core_post_stanza(origin, stanza, preevents)
151 local to = stanza.attr.to; 151 local to = stanza.attr.to;