aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-08-25 21:31:04 +0200
committerKim Alvefur <zash@zash.se>2019-08-25 21:31:04 +0200
commit48e395179d9f64d90f8e36d44b3d6fe1f857c264 (patch)
tree3f7bdf51b1599dabbc5d105f2a2eebb4c12e20cb /plugins/muc
parent7cd3955aa03761deb3cb5eeb56e3f22402b0f3c5 (diff)
downloadprosody-48e395179d9f64d90f8e36d44b3d6fe1f857c264.tar.gz
prosody-48e395179d9f64d90f8e36d44b3d6fe1f857c264.zip
MUC: Simplify nickname refresh loop
Affiliation data is passed as a loop variable so no need to retrieve it
Diffstat (limited to 'plugins/muc')
-rw-r--r--plugins/muc/register.lib.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/muc/register.lib.lua b/plugins/muc/register.lib.lua
index 21cb3f2f..da106f8c 100644
--- a/plugins/muc/register.lib.lua
+++ b/plugins/muc/register.lib.lua
@@ -15,8 +15,7 @@ local function get_reserved_nicks(room)
end
module:log("debug", "Refreshing reserved nicks...");
local reserved_nicks = {};
- for jid in room:each_affiliation() do
- local data = room._affiliation_data[jid];
+ for jid, _, data in room:each_affiliation() do
local nick = data and data.reserved_nickname;
module:log("debug", "Refreshed for %s: %s", jid, nick);
if nick then