Comparison

plugins/muc/mod_muc.lua @ 7403:d6e6e21057f0

MUC: Correctly iterate over suspended rooms while excluding live rooms
author Kim Alvefur <zash@zash.se>
date Tue, 26 Apr 2016 13:40:03 +0200
parent 7372:b2d7e04eb922
child 7404:57ca4dcd91a7
comparison
equal deleted inserted replaced
7402:ef7ea3bad7a1 7403:d6e6e21057f0
178 for room in rooms:values() do 178 for room in rooms:values() do
179 coroutine.yield(room); 179 coroutine.yield(room);
180 seen[room.jid] = true; 180 seen[room.jid] = true;
181 end 181 end
182 for room_jid in pairs(persistent_rooms_storage:get(nil) or {}) do 182 for room_jid in pairs(persistent_rooms_storage:get(nil) or {}) do
183 if seen[room_jid] then 183 if not seen[room_jid] then
184 local room = restore_room(room_jid); 184 local room = restore_room(room_jid);
185 if room == nil then 185 if room == nil then
186 module:log("error", "Missing data for room '%s', omitting from iteration", room_jid); 186 module:log("error", "Missing data for room '%s', omitting from iteration", room_jid);
187 else 187 else
188 coroutine.yield(room); 188 coroutine.yield(room);