Software /
code /
prosody
Comparison
plugins/mod_presence.lua @ 7778:62e7d6a73c72
mod_presence: Send probe once subscribed (fixes #794)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 08 Dec 2016 20:49:35 +0100 |
parent | 7430:ad0b15f253ee |
child | 7779:b1f80447a2b1 |
comparison
equal
deleted
inserted
replaced
7777:65836cf2d057 | 7778:62e7d6a73c72 |
---|---|
199 if rostermanager.subscribed(node, host, to_bare) then | 199 if rostermanager.subscribed(node, host, to_bare) then |
200 rostermanager.roster_push(node, host, to_bare); | 200 rostermanager.roster_push(node, host, to_bare); |
201 end | 201 end |
202 core_post_stanza(origin, stanza); | 202 core_post_stanza(origin, stanza); |
203 send_presence_of_available_resources(node, host, to_bare, origin); | 203 send_presence_of_available_resources(node, host, to_bare, origin); |
204 core_post_stanza(origin, st.presence({ type = "probe", from = from_bare, to = to_bare })); | 204 if rostermanager.is_user_subscribed(node, host, to_bare) then |
205 core_post_stanza(origin, st.presence({ type = "probe", from = from_bare, to = to_bare })); | |
206 end | |
205 elseif stanza.attr.type == "unsubscribed" then | 207 elseif stanza.attr.type == "unsubscribed" then |
206 -- 1. send unavailable | 208 -- 1. send unavailable |
207 -- 2. route stanza | 209 -- 2. route stanza |
208 -- 3. roster push (subscription = from or both) | 210 -- 3. roster push (subscription = from or both) |
209 local success, pending_in, subscribed = rostermanager.unsubscribed(node, host, to_bare); | 211 local success, pending_in, subscribed = rostermanager.unsubscribed(node, host, to_bare); |