diff options
author | Kim Alvefur <zash@zash.se> | 2014-10-26 16:29:50 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2014-10-26 16:29:50 +0100 |
commit | 58138b1fd556ab505da50b7d33632cccfc9d5606 (patch) | |
tree | 37ff0e479e8d785c042521d7ec75a56db1c7ad99 | |
parent | 9c15f1ec5f33f1e7974820e381c4bd7736d21e0c (diff) | |
download | prosody-58138b1fd556ab505da50b7d33632cccfc9d5606.tar.gz prosody-58138b1fd556ab505da50b7d33632cccfc9d5606.zip |
mod_blocklist: Don't send unavailable presence from unavailable sessions when blocking a contact
-rw-r--r-- | plugins/mod_blocklist.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_blocklist.lua b/plugins/mod_blocklist.lua index 45415790..70bfb5fc 100644 --- a/plugins/mod_blocklist.lua +++ b/plugins/mod_blocklist.lua @@ -149,7 +149,9 @@ local function edit_blocklist(event) for jid, in_roster in pairs(new) do if not blocklist[jid] and in_roster and sessions[username] then for _, session in pairs(sessions[username].sessions) do - module:send(st.presence({ type = "unavailable", to = jid, from = session.full_jid })); + if session.presence then + module:send(st.presence({ type = "unavailable", to = jid, from = session.full_jid })); + end end end end |