aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_blocklist.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_blocklist.lua')
-rw-r--r--plugins/mod_blocklist.lua4
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