Comparison

plugins/mod_presence.lua @ 9790:4a419089ad00

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Thu, 17 Jan 2019 01:09:38 +0100
parent 9677:d0cc1c4e1a1c
parent 9788:f47b2ab877d0
child 10514:f0e9e5bda415
comparison
equal deleted inserted replaced
9787:6625efab91e2 9790:4a419089ad00
61 if item.subscription == "both" or item.subscription == "from" then 61 if item.subscription == "both" or item.subscription == "from" then
62 stanza.attr.to = jid; 62 stanza.attr.to = jid;
63 core_post_stanza(origin, stanza, true); 63 core_post_stanza(origin, stanza, true);
64 end 64 end
65 end 65 end
66 stanza.attr.to = nil;
66 if stanza.attr.type == nil and not origin.presence then -- initial presence 67 if stanza.attr.type == nil and not origin.presence then -- initial presence
67 module:fire_event("presence/initial", { origin = origin, stanza = stanza } ); 68 module:fire_event("presence/initial", { origin = origin, stanza = stanza } );
68 origin.presence = stanza; -- FIXME repeated later 69 origin.presence = stanza; -- FIXME repeated later
69 local probe = st.presence({from = origin.full_jid, type = "probe"}); 70 local probe = st.presence({from = origin.full_jid, type = "probe"});
70 for jid, item in pairs(roster) do -- probe all contacts we are subscribed to 71 for jid, item in pairs(roster) do -- probe all contacts we are subscribed to