MUC: Correctly iterate over suspended rooms while excluding live rooms
authorKim Alvefur <zash@zash.se>
Tue, 26 Apr 2016 13:40:03 +0200
changeset 7406 d6e6e21057f0
parent 7405 ef7ea3bad7a1
child 7407 57ca4dcd91a7
MUC: Correctly iterate over suspended rooms while excluding live rooms
plugins/muc/mod_muc.lua
--- a/plugins/muc/mod_muc.lua	Wed Apr 20 12:29:31 2016 +0200
+++ b/plugins/muc/mod_muc.lua	Tue Apr 26 13:40:03 2016 +0200
@@ -180,7 +180,7 @@
 			seen[room.jid] = true;
 		end
 		for room_jid in pairs(persistent_rooms_storage:get(nil) or {}) do
-			if seen[room_jid] then
+			if not seen[room_jid] then
 				local room = restore_room(room_jid);
 				if room == nil then
 					module:log("error", "Missing data for room '%s', omitting from iteration", room_jid);