mod_presence: Send unavailable presence when roster items are removed (fixes #331)
[prosody.git] / 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