Software /
code /
prosody
Changeset
9026:91b5a5667016
MUC: Use nickname from occupant object
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 12 Jul 2018 02:31:47 +0200 |
parents | 9025:0f12d46cf754 |
children | 9027:4028eb4a9f7f |
files | plugins/muc/muc.lib.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Thu Jul 12 02:15:22 2018 +0200 +++ b/plugins/muc/muc.lib.lua Thu Jul 12 02:31:47 2018 +0200 @@ -402,7 +402,7 @@ 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;