Software / code / prosody
Comparison
plugins/mod_blocklist.lua @ 10111:0f335815244f
plugins: Remove tostring call from logging
Taken care of by loggingmanager now
Mass-rewrite using lua pattern like `tostring%b()`
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 30 Jul 2019 02:29:36 +0200 |
| parent | 10054:0656bd283fa2 |
| child | 12775:1dd468c63a3d |
| child | 13487:84fa880bf476 |
comparison
equal
deleted
inserted
replaced
| 10110:3fa3872588a8 | 10111:0f335815244f |
|---|---|
| 65 module:log("info", "Migrating blocklist from mod_privacy storage for user '%s'", username); | 65 module:log("info", "Migrating blocklist from mod_privacy storage for user '%s'", username); |
| 66 for _, item in ipairs(default_list.items) do | 66 for _, item in ipairs(default_list.items) do |
| 67 if item.type == "jid" and item.action == "deny" then | 67 if item.type == "jid" and item.action == "deny" then |
| 68 local jid = jid_prep(item.value); | 68 local jid = jid_prep(item.value); |
| 69 if not jid then | 69 if not jid then |
| 70 module:log("warn", "Invalid JID in privacy store for user '%s' not migrated: %s", username, tostring(item.value)); | 70 module:log("warn", "Invalid JID in privacy store for user '%s' not migrated: %s", username, item.value); |
| 71 else | 71 else |
| 72 migrated_data[jid] = true; | 72 migrated_data[jid] = true; |
| 73 end | 73 end |
| 74 end | 74 end |
| 75 end | 75 end |