plugins/muc/muc.lib.lua
changeset 10455 347d16d70280
parent 10453 2e36a54906e4
child 10554 0566b45da987
--- a/plugins/muc/muc.lib.lua	Tue Nov 26 00:02:13 2019 +0100
+++ b/plugins/muc/muc.lib.lua	Tue Nov 26 00:09:51 2019 +0100
@@ -456,6 +456,7 @@
 end, 2);
 
 module:hook("muc-occupant-pre-change", function(event)
+	local room = event.room;
 	local nick = jid_resource(event.dest_occupant.nick);
 	if not resourceprep(nick, true) then -- strict
 		event.origin.send(st.error_reply(event.stanza, "modify", "jid-malformed", "Nickname must pass strict validation", room.jid));