comparison mod_muc_auto_reserve_nicks/mod_muc_auto_reserve_nicks.lua @ 4951:c83bc703825d

mod_muc_auto_reserve_nicks: Force refresh of nickname (thanks phryk)
author Kim Alvefur <zash@zash.se>
date Sun, 22 May 2022 20:33:14 +0200
parents 85d4ab318d66
children
comparison
equal deleted inserted replaced
4950:8f625a7dc957 4951:c83bc703825d
13 local aff_data = event.room:get_affiliation_data(user_jid); 13 local aff_data = event.room:get_affiliation_data(user_jid);
14 if not aff_data then 14 if not aff_data then
15 local reserved_nick = jid.resource(occupant.nick); 15 local reserved_nick = jid.resource(occupant.nick);
16 module:log("debug", "Automatically reserving nickname '%s' for <%s>", reserved_nick, user_jid); 16 module:log("debug", "Automatically reserving nickname '%s' for <%s>", reserved_nick, user_jid);
17 room:set_affiliation_data(user_jid, "reserved_nickname", reserved_nick); 17 room:set_affiliation_data(user_jid, "reserved_nickname", reserved_nick);
18 room._reserved_nicks = nil; -- force refresh of nickname map
18 end 19 end
19 end); 20 end);