Software / code / prosody
Comparison
plugins/mod_presence.lua @ 7430:ad0b15f253ee
mod_presence: Re-probe for contacts presence after outgoing 'subscribed' (fixes #673)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 21 May 2016 19:10:03 +0200 |
| parent | 5416:0ba3a49d3863 |
| child | 7433:7eec6f3c7300 |
| child | 7778:62e7d6a73c72 |
comparison
equal
deleted
inserted
replaced
| 7398:206f9b0485ad | 7430:ad0b15f253ee |
|---|---|
| 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 elseif stanza.attr.type == "unsubscribed" then | 205 elseif stanza.attr.type == "unsubscribed" then |
| 205 -- 1. send unavailable | 206 -- 1. send unavailable |
| 206 -- 2. route stanza | 207 -- 2. route stanza |
| 207 -- 3. roster push (subscription = from or both) | 208 -- 3. roster push (subscription = from or both) |
| 208 local success, pending_in, subscribed = rostermanager.unsubscribed(node, host, to_bare); | 209 local success, pending_in, subscribed = rostermanager.unsubscribed(node, host, to_bare); |