Comparison

core/stanza_dispatch.lua @ 4:09c3845ed442

Presence unavailable on disconnect
author matthew
date Sun, 24 Aug 2008 14:52:02 +0000
parent 2:9bb397205f26
child 6:7ad47ce20394
comparison
equal deleted inserted replaced
3:f674eb704134 4:09c3845ed442
104 -- Broadcast presence and probes 104 -- Broadcast presence and probes
105 local broadcast = st.presence({ from = session.full_jid, type = stanza.attr.type }); 105 local broadcast = st.presence({ from = session.full_jid, type = stanza.attr.type });
106 --local probe = st.presence { from = broadcast.attr.from, type = "probe" }; 106 --local probe = st.presence { from = broadcast.attr.from, type = "probe" };
107 107
108 for child in stanza:childtags() do 108 for child in stanza:childtags() do
109 broadcast:text(tostring(child)); 109 broadcast:add_child(child);
110 end 110 end
111 for contact_jid in pairs(session.roster) do 111 for contact_jid in pairs(session.roster) do
112 broadcast.attr.to = contact_jid; 112 broadcast.attr.to = contact_jid;
113 send_to(contact_jid, broadcast); 113 send_to(contact_jid, broadcast);
114 if initial_presence then 114 if initial_presence then