Software /
code /
prosody
Changeset
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 |
parents | 7777:65836cf2d057 |
children | 7779:b1f80447a2b1 7805:1cb90024e8db |
files | plugins/mod_presence.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_presence.lua Fri Dec 09 15:15:10 2016 +0100 +++ b/plugins/mod_presence.lua Thu Dec 08 20:49:35 2016 +0100 @@ -201,7 +201,9 @@ end core_post_stanza(origin, stanza); send_presence_of_available_resources(node, host, to_bare, origin); - core_post_stanza(origin, st.presence({ type = "probe", from = from_bare, to = to_bare })); + if rostermanager.is_user_subscribed(node, host, to_bare) then + core_post_stanza(origin, st.presence({ type = "probe", from = from_bare, to = to_bare })); + end elseif stanza.attr.type == "unsubscribed" then -- 1. send unavailable -- 2. route stanza