mod_muc_restrict_rooms: Fixed the way of getting room and user
authorNicolás Kovac <nkneumann(at)gmail.com>
Fri, 20 Feb 2015 22:45:45 +0000
changeset 1618 79adec50b24d
parent 1617 ca04f75958f7
child 1619 d0fd8a29b724
mod_muc_restrict_rooms: Fixed the way of getting room and user
mod_muc_restrict_rooms/mod_muc_restrict_rooms.lua
--- a/mod_muc_restrict_rooms/mod_muc_restrict_rooms.lua	Fri Feb 20 21:28:39 2015 +0000
+++ b/mod_muc_restrict_rooms/mod_muc_restrict_rooms.lua	Fri Feb 20 22:45:45 2015 +0000
@@ -44,11 +44,11 @@
         end
 
 	-- Get the room
-	local room = jid.split(stanza.attr.from);
+	local room = jid.split(stanza.attr.to);
         if not room then return; end
 
 	-- Get who has tried to join it
-	local who = jid.bare(stanza.attr.to)
+	local who = jid.bare(stanza.attr.from)
 
 	-- Checking whether room is restricted
 	local check_restricted = is_restricted(room, who)