aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-08-06 13:27:47 +0200
committerKim Alvefur <zash@zash.se>2017-08-06 13:27:47 +0200
commit239f4bd260a50271572c763403152e11b3fd6381 (patch)
tree7d26d80fd750f7c87bf79b6cc77a5b3a95117605
parentd7b37ef781681b9ab89d340cd9aab1402f03a1bd (diff)
downloadprosody-239f4bd260a50271572c763403152e11b3fd6381.tar.gz
prosody-239f4bd260a50271572c763403152e11b3fd6381.zip
MUC: Use variable that actually exists (thanks Martin)
-rw-r--r--plugins/muc/muc.lib.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index e16a43f6..53b4f682 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -437,7 +437,7 @@ function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc
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 @@ function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc
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;