plugins/muc/mod_muc.lua
changeset 7413 45f543c82893
parent 7407 57ca4dcd91a7
child 7414 f385cd6127b2
equal deleted inserted replaced
7412:9a3ce6da3256 7413:45f543c82893
   271 		local room = get_room_from_jid(room_jid);
   271 		local room = get_room_from_jid(room_jid);
   272 		if room == nil then
   272 		if room == nil then
   273 			-- Watch presence to create rooms
   273 			-- Watch presence to create rooms
   274 			if stanza.attr.type == nil and stanza.name == "presence" then
   274 			if stanza.attr.type == nil and stanza.name == "presence" then
   275 				room = muclib.new_room(room_jid);
   275 				room = muclib.new_room(room_jid);
       
   276 				return room:handle_first_presence(origin, stanza);
   276 			elseif stanza.attr.type ~= "error" then
   277 			elseif stanza.attr.type ~= "error" then
   277 				origin.send(st.error_reply(stanza, "cancel", "not-allowed"));
   278 				origin.send(st.error_reply(stanza, "cancel", "not-allowed"));
   278 				return true;
   279 				return true;
   279 			else
   280 			else
   280 				return;
   281 				return;