Software /
code /
prosody
Changeset
8191:d43012448c1f
MUC: Use variable that actually exists (thanks Martin)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 06 Aug 2017 13:27:47 +0200 |
parents | 8190:331caee0c774 |
children | 8192:4354f556c5db |
files | plugins/muc/muc.lib.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Fri Aug 04 20:27:43 2017 +0200 +++ b/plugins/muc/muc.lib.lua Sun Aug 06 13:27:47 2017 +0200 @@ -437,7 +437,7 @@ else -- change nick -- a MUC service MUST NOT allow empty or invisible Room Nicknames -- (i.e., Room Nicknames that consist only of one or more space characters). - if not select(3, jid_split(nick)):find("[^ ]") then -- resourceprep turns all whitespace into 0x20 + if not select(3, jid_split(to)):find("[^ ]") then -- resourceprep turns all whitespace into 0x20 module:log("debug", "Rejecting invisible nickname"); origin.send(st.error_reply(stanza, "cancel", "not-allowed")); return; @@ -476,7 +476,7 @@ else -- enter room -- a MUC service MUST NOT allow empty or invisible Room Nicknames -- (i.e., Room Nicknames that consist only of one or more space characters). - if not select(3, jid_split(nick)):find("[^ ]") then -- resourceprep turns all whitespace into 0x20 + if not select(3, jid_split(to)):find("[^ ]") then -- resourceprep turns all whitespace into 0x20 module:log("debug", "Rejecting invisible nickname"); origin.send(st.error_reply(stanza, "cancel", "not-allowed")); return;