Comparison

plugins/muc/mod_muc.lua @ 9049:5870a0a6d4b6

MUC: Rename variable for consistency with other code that uses the term 'live'
author Matthew Wild <mwild1@gmail.com>
date Tue, 17 Jul 2018 10:01:19 +0100
parent 9048:c58be87e62d0
child 9050:f5c43e829d93
comparison
equal deleted inserted replaced
9048:c58be87e62d0 9049:5870a0a6d4b6
11 -- create_room(jid) -> room 11 -- create_room(jid) -> room
12 -- track_room(room) 12 -- track_room(room)
13 -- delete_room(room) 13 -- delete_room(room)
14 -- forget_room(room) 14 -- forget_room(room)
15 -- get_room_from_jid(jid) -> room 15 -- get_room_from_jid(jid) -> room
16 -- each_room(local_only) -> () -> room 16 -- each_room(live_only) -> () -> room
17 -- shutdown_component() 17 -- shutdown_component()
18 18
19 if module:get_host_type() ~= "component" then 19 if module:get_host_type() ~= "component" then
20 error("MUC should be loaded as a component, please see https://prosody.im/doc/components", 0); 20 error("MUC should be loaded as a component, please see https://prosody.im/doc/components", 0);
21 end 21 end
247 room = room; 247 room = room;
248 }); 248 });
249 return track_room(room); 249 return track_room(room);
250 end 250 end
251 251
252 function each_room(local_only) 252 function each_room(live_only)
253 if local_only then 253 if live_only then
254 return rooms:values(); 254 return rooms:values();
255 end 255 end
256 return coroutine.wrap(function () 256 return coroutine.wrap(function ()
257 local seen = {}; -- Don't iterate over persistent rooms twice 257 local seen = {}; -- Don't iterate over persistent rooms twice
258 for room in rooms:values() do 258 for room in rooms:values() do