Comparison

core/stanza_router.lua @ 1258:01b69efffb1c

stanza_router: Don't route before firing events... waqas, is this safe?
author Matthew Wild <mwild1@gmail.com>
date Sun, 31 May 2009 22:52:50 +0100
parent 1256:98f0e9eadf3b
child 1263:7797354dc9b5
comparison
equal deleted inserted replaced
1257:8c9f20d3a17f 1258:01b69efffb1c
163 component_handle_stanza(origin, stanza); 163 component_handle_stanza(origin, stanza);
164 return; 164 return;
165 else 165 else
166 if (h.events or prosody.events).fire_event(stanza.name..to_type, event_data) then return; end -- do processing 166 if (h.events or prosody.events).fire_event(stanza.name..to_type, event_data) then return; end -- do processing
167 end 167 end
168 else -- non-local recipient
169 core_route_stanza(origin, stanza);
170 return;
171 end 168 end
172 169
173 if host and fire_event(host.."/"..stanza.name, event_data) then 170 if host and fire_event(host.."/"..stanza.name, event_data) then
174 -- event handled 171 -- event handled
175 elseif stanza.name == "presence" and origin.host and fire_event(origin.host.."/"..stanza.name, event_data) then 172 elseif stanza.name == "presence" and origin.host and fire_event(origin.host.."/"..stanza.name, event_data) then