comparison mod_http_muc_log/mod_http_muc_log.lua @ 1575:464ed6bc5a73

mod_http_muc_log: Fix use with old (until 0.10) MUC API
author Kim Alvefur <zash@zash.se>
date Thu, 20 Nov 2014 18:46:53 +0100
parents eed7db9f3157
children 91b91052e0e8
comparison
equal deleted inserted replaced
1574:7ebec464914e 1575:464ed6bc5a73
201 201
202 local function public_room(room) 202 local function public_room(room)
203 if type(room) == "string" then 203 if type(room) == "string" then
204 room = get_room(room); 204 room = get_room(room);
205 end 205 end
206 return room and not room:get_hidden() and not room:get_members_only() and room._data.logging ~= false; 206 return (room
207 and not (room.get_hidden or room.is_hidden)(room)
208 and not (room.get_members_only or room.is_members_only)(room)
209 and room._data.logging ~= false);
207 end 210 end
208 211
209 -- FIXME Invent some more efficient API for this 212 -- FIXME Invent some more efficient API for this
210 local function dates_page(event, path) 213 local function dates_page(event, path)
211 local request, response = event.request, event.response; 214 local request, response = event.request, event.response;
323 if public_room(room) then 326 if public_room(room) then
324 room_list[i], i = room_item_template { 327 room_list[i], i = room_item_template {
325 room = jid_split(room.jid); 328 room = jid_split(room.jid);
326 name = room:get_name(); 329 name = room:get_name();
327 description = room:get_description(); 330 description = room:get_description();
328 subject = room:get_subject();
329 }, i + 1; 331 }, i + 1;
330 end 332 end
331 end 333 end
332 return room_list_template { 334 return room_list_template {
333 host = module.host; 335 host = module.host;