diff options
author | Kim Alvefur <zash@zash.se> | 2019-08-25 21:31:04 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-08-25 21:31:04 +0200 |
commit | 48e395179d9f64d90f8e36d44b3d6fe1f857c264 (patch) | |
tree | 3f7bdf51b1599dabbc5d105f2a2eebb4c12e20cb /plugins/muc/register.lib.lua | |
parent | 7cd3955aa03761deb3cb5eeb56e3f22402b0f3c5 (diff) | |
download | prosody-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/register.lib.lua')
-rw-r--r-- | plugins/muc/register.lib.lua | 3 |
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 |