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
commitcc8653d31c87dcdf4d140697e87b57ca5130d9d5 (patch)
tree7d26d80fd750f7c87bf79b6cc77a5b3a95117605
parentef1f75a9dd0ebd0f116508b89abbcd790482eb07 (diff)
downloadprosody-cc8653d31c87dcdf4d140697e87b57ca5130d9d5.tar.gz
prosody-cc8653d31c87dcdf4d140697e87b57ca5130d9d5.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;