Comparison

plugins/mod_presence.lua @ 7779:b1f80447a2b1

Merge 0.9->0.10
author Kim Alvefur <zash@zash.se>
date Fri, 09 Dec 2016 17:07:57 +0100
parent 7470:893378a1c03e
parent 7778:62e7d6a73c72
child 8071:c3790ca4144f
comparison
equal deleted inserted replaced
7776:63f50a84318f 7779:b1f80447a2b1
176 if rostermanager.subscribed(node, host, to_bare) then 176 if rostermanager.subscribed(node, host, to_bare) then
177 rostermanager.roster_push(node, host, to_bare); 177 rostermanager.roster_push(node, host, to_bare);
178 end 178 end
179 core_post_stanza(origin, stanza); 179 core_post_stanza(origin, stanza);
180 send_presence_of_available_resources(node, host, to_bare, origin); 180 send_presence_of_available_resources(node, host, to_bare, origin);
181 core_post_stanza(origin, st.presence({ type = "probe", from = from_bare, to = to_bare })); 181 if rostermanager.is_user_subscribed(node, host, to_bare) then
182 core_post_stanza(origin, st.presence({ type = "probe", from = from_bare, to = to_bare }));
183 end
182 elseif stanza.attr.type == "unsubscribed" then 184 elseif stanza.attr.type == "unsubscribed" then
183 -- 1. send unavailable 185 -- 1. send unavailable
184 -- 2. route stanza 186 -- 2. route stanza
185 -- 3. roster push (subscription = from or both) 187 -- 3. roster push (subscription = from or both)
186 local success, pending_in, subscribed = rostermanager.unsubscribed(node, host, to_bare); 188 local success, pending_in, subscribed = rostermanager.unsubscribed(node, host, to_bare);