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 | 1295efd944da3e95e66243eab2ac4fe0b4de556e (patch) | |
tree | 3f7bdf51b1599dabbc5d105f2a2eebb4c12e20cb | |
parent | df3f84ce546ea55074a11a69aab473012369af8f (diff) | |
download | prosody-1295efd944da3e95e66243eab2ac4fe0b4de556e.tar.gz prosody-1295efd944da3e95e66243eab2ac4fe0b4de556e.zip |
MUC: Simplify nickname refresh loop
Affiliation data is passed as a loop variable so no need to retrieve it
-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 |