Comparison

core/moduleapi.lua @ 7343:1da5a710848d

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Thu, 07 Apr 2016 13:36:58 +0200
parent 7164:af26e8eb591f
parent 7342:79a5db780e8b
child 7647:e9d7a409e236
comparison
equal deleted inserted replaced
7341:aa94cd27df4d 7343:1da5a710848d
373 end 373 end
374 item._provided_by = self.name; 374 item._provided_by = self.name;
375 self:add_item(name.."-provider", item); 375 self:add_item(name.."-provider", item);
376 end 376 end
377 377
378 function api:send(stanza) 378 function api:send(stanza, origin)
379 return core_post_stanza(hosts[self.host], stanza); 379 return core_post_stanza(origin or hosts[self.host], stanza);
380 end 380 end
381 381
382 function api:broadcast(jids, stanza, iter) 382 function api:broadcast(jids, stanza, iter)
383 for jid in (iter or it.values)(jids) do 383 for jid in (iter or it.values)(jids) do
384 local new_stanza = st.clone(stanza); 384 local new_stanza = st.clone(stanza);