Software /
code /
prosody
Diff
plugins/muc/muc.lib.lua @ 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 |
parent | 8187:4d83876aac3e |
child | 8201:a0ad62a269df |
child | 8466:df970f76c720 |
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;