core/stanza_router.lua

changeset 1412
6cfcab7cd4e7
parent 1411
b12096b69f36
child 1413
b7e17efe433e
equal deleted inserted replaced
1411:b12096b69f36 1412:6cfcab7cd4e7
180 180
181 -- Auto-detect origin if not specified 181 -- Auto-detect origin if not specified
182 origin = origin or hosts[from_host]; 182 origin = origin or hosts[from_host];
183 if not origin then return false; end 183 if not origin then return false; end
184 184
185 local host_session = hosts[host] 185 if hosts[host] then
186 if host_session and host_session.type == "local" then
187 -- old stanza routing code removed 186 -- old stanza routing code removed
188 core_post_stanza(origin, stanza); 187 core_post_stanza(origin, stanza);
189 elseif origin.type == "c2s" then 188 elseif origin.type == "c2s" then
190 -- Remote host 189 -- Remote host
191 local xmlns = stanza.attr.xmlns; 190 local xmlns = stanza.attr.xmlns;

mercurial