Comparison

core/moduleapi.lua @ 9042:734ba7080b35

moduleapi: Use :send API from :broadcast for compactness
author Kim Alvefur <zash@zash.se>
date Sat, 14 Jul 2018 21:25:34 +0200
parent 8994:f17e768c1a99
child 9149:d03f21729b2c
comparison
equal deleted inserted replaced
9041:b3bc742ee188 9042:734ba7080b35
364 364
365 function api:broadcast(jids, stanza, iter) 365 function api:broadcast(jids, stanza, iter)
366 for jid in (iter or it.values)(jids) do 366 for jid in (iter or it.values)(jids) do
367 local new_stanza = st.clone(stanza); 367 local new_stanza = st.clone(stanza);
368 new_stanza.attr.to = jid; 368 new_stanza.attr.to = jid;
369 core_post_stanza(hosts[self.host], new_stanza); 369 self:send(new_stanza);
370 end 370 end
371 end 371 end
372 372
373 local timer_methods = { } 373 local timer_methods = { }
374 local timer_mt = { 374 local timer_mt = {