comparison mod_http_muc_log/mod_http_muc_log.lua @ 3560:0ebb7112c102

mod_http_muc_log: Allow trailing slash after date For compat with links generated by mod_muc_log_http
author Kim Alvefur <zash@zash.se>
date Tue, 09 Apr 2019 18:05:28 +0200
parents 887ce59cf396
children ea63dc0cc824
comparison
equal deleted inserted replaced
3559:d56cb74a0db8 3560:0ebb7112c102
229 local function logs_page(event, path) 229 local function logs_page(event, path)
230 local request, response = event.request, event.response; 230 local request, response = event.request, event.response;
231 231
232 -- FIXME In the year, 105105, if MUC is still alive, 232 -- FIXME In the year, 105105, if MUC is still alive,
233 -- if Prosody can survive... Enjoy this Y10k bug 233 -- if Prosody can survive... Enjoy this Y10k bug
234 local room, date = path:match("^(.-)/(%d%d%d%d%-%d%d%-%d%d)$"); 234 local room, date = path:match("^(.-)/(%d%d%d%d%-%d%d%-%d%d)/?$");
235 room = nodeprep(room); 235 room = nodeprep(room);
236 if not room then 236 if not room then
237 return years_page(event, path); 237 return years_page(event, path);
238 end 238 end
239 local is_open = open_room(room); 239 local is_open = open_room(room);