Software / code / prosody
Changeset
10225:9bdd9b6bf362
MUC: Simplify nickname refresh loop
Affiliation data is passed as a loop variable so no need to retrieve it
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 25 Aug 2019 21:31:04 +0200 |
| parents | 10224:94e341dee51c |
| children | 10226:77f900bbbf25 |
| files | plugins/muc/register.lib.lua |
| diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/register.lib.lua Sun Aug 25 20:22:35 2019 +0200 +++ b/plugins/muc/register.lib.lua Sun Aug 25 21:31:04 2019 +0200 @@ -15,8 +15,7 @@ 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