aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_blocklist.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-12-05 17:25:02 +0100
committerKim Alvefur <zash@zash.se>2016-12-05 17:25:02 +0100
commit8945f8cba1aac03016b0e8449ba37a99a3b43264 (patch)
treedfc0b55beead5336ca95cac57916c84a38261d17 /plugins/mod_blocklist.lua
parentf6809f29d284dc8613e7b89a45685b78d245629e (diff)
downloadprosody-8945f8cba1aac03016b0e8449ba37a99a3b43264.tar.gz
prosody-8945f8cba1aac03016b0e8449ba37a99a3b43264.zip
mod_blocklist: Remove one indentation level
Diffstat (limited to 'plugins/mod_blocklist.lua')
-rw-r--r--plugins/mod_blocklist.lua22
1 files changed, 10 insertions, 12 deletions
diff --git a/plugins/mod_blocklist.lua b/plugins/mod_blocklist.lua
index e2dd8117..f5198108 100644
--- a/plugins/mod_blocklist.lua
+++ b/plugins/mod_blocklist.lua
@@ -61,18 +61,16 @@ local function migrate_privacy_list(username)
local migrated_data = { [false] = { created = os.time(); migrated = "privacy" }};
- if legacy_data then
- module:log("info", "Migrating blocklist from mod_privacy storage for user '%s'", username);
- local item, jid;
- for i = 1, #legacy_data do
- item = legacy_data[i];
- if item.type == "jid" and item.action == "deny" then
- 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));
- else
- migrated_data[jid] = true;
- end
+ module:log("info", "Migrating blocklist from mod_privacy storage for user '%s'", username);
+ local item, jid;
+ for i = 1, #legacy_data do
+ item = legacy_data[i];
+ if item.type == "jid" and item.action == "deny" then
+ 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));
+ else
+ migrated_data[jid] = true;
end
end
end