aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_blocklist.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-11-23 23:12:01 +0100
committerKim Alvefur <zash@zash.se>2019-11-23 23:12:01 +0100
commit72f1544f6d7301d1313c333f1147b27e242063df (patch)
tree1a5b57117c8c88f05ebb8b67a0d2848988b7620c /plugins/mod_blocklist.lua
parent7ac5e467baa7ebc557ed3a07bdca7dc9ade0c1db (diff)
parentdfa2bdffc083faa597509d7f35125c41f6ffbc9d (diff)
downloadprosody-72f1544f6d7301d1313c333f1147b27e242063df.tar.gz
prosody-72f1544f6d7301d1313c333f1147b27e242063df.zip
Merge 0.11->trunk
Diffstat (limited to 'plugins/mod_blocklist.lua')
-rw-r--r--plugins/mod_blocklist.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/mod_blocklist.lua b/plugins/mod_blocklist.lua
index ee48ffad..dad06b62 100644
--- a/plugins/mod_blocklist.lua
+++ b/plugins/mod_blocklist.lua
@@ -67,7 +67,7 @@ local function migrate_privacy_list(username)
if item.type == "jid" and item.action == "deny" then
local jid = jid_prep(item.value);
if not jid then
- module:log("warn", "Invalid JID in privacy store for user '%s' not migrated: %s", username, tostring(item.value));
+ module:log("warn", "Invalid JID in privacy store for user '%s' not migrated: %s", username, item.value);
else
migrated_data[jid] = true;
end
@@ -162,7 +162,7 @@ local function edit_blocklist(event)
local blocklist = cache[username] or get_blocklist(username);
local new_blocklist = {
- -- We set the [false] key to someting as a signal not to migrate privacy lists
+ -- We set the [false] key to something as a signal not to migrate privacy lists
[false] = blocklist[false] or { created = now; };
};
if type(blocklist[false]) == "table" then
@@ -189,6 +189,7 @@ local function edit_blocklist(event)
if is_blocking then
for jid in pairs(send_unavailable) do
+ -- Check that this JID isn't already blocked, i.e. this is not a change
if not blocklist[jid] then
for _, session in pairs(sessions[username].sessions) do
if session.presence then