aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-07-12 02:31:47 +0200
committerKim Alvefur <zash@zash.se>2018-07-12 02:31:47 +0200
commit62fc4e5a0357bb6fe99f3b3eaa84407c445ebcf3 (patch)
tree347649f52842ee47a84c615e9bb41bf81dcf5879
parent5f236e1cb5996afeca61dabdb426a5a8544d2291 (diff)
downloadprosody-62fc4e5a0357bb6fe99f3b3eaa84407c445ebcf3.tar.gz
prosody-62fc4e5a0357bb6fe99f3b3eaa84407c445ebcf3.zip
MUC: Use nickname from occupant object
-rw-r--r--plugins/muc/muc.lib.lua2
1 files changed, 1 insertions, 1 deletions
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;