From 62fc4e5a0357bb6fe99f3b3eaa84407c445ebcf3 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 12 Jul 2018 02:31:47 +0200 Subject: MUC: Use nickname from occupant object --- plugins/muc/muc.lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/muc') diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index af79563a..3ec69923 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -402,7 +402,7 @@ module:hook("muc-occupant-pre-join", function(event) end, -10); module:hook("muc-occupant-pre-join", function(event) - local nick = jid_resource(event.stanza.attr.from); + local nick = jid_resource(event.occupant.nick); if not nick:find("%S") then event.origin.send(st.error_reply(event.stanza, "modify", "not-allowed", "Invisible Nicknames are forbidden")); return true; -- cgit v1.2.3