mod_presence: Send unavailable presence when roster items are removed (fixes #331)
authorKim Alvefur <zash@zash.se>
Mon, 4 Apr 2016 15:15:47 +0000 (17:15 +0200)
committerKim Alvefur <zash@zash.se>
Mon, 4 Apr 2016 15:15:47 +0000 (17:15 +0200)
plugins/mod_presence.lua

index 5562fecfe66dff3626f36a0faac9c5d35d787781..d4f2f28dff4a4056638514f8612fa8126fe257ac 100644 (file)
@@ -374,6 +374,7 @@ module:hook("roster-item-removed", function (event)
        end
 
        if subscription == "both" or subscription == "to" or ask then
+               send_presence_of_available_resources(username, module.host, jid, session, st.presence({type="unavailable"}));
                core_post_stanza(session, st.presence({type="unsubscribe", from=session.full_jid, to=jid}));
        end