Mercurial > prosody-modules
comparison mod_http_muc_log/mod_http_muc_log.lua @ 4938:bc8832c6696b
upstream merge
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 11 May 2022 12:44:32 +0200 |
parents | 13070c6a7ce8 |
children | 479d618c9e6d |
comparison
equal
deleted
inserted
replaced
4913:3ddab718f717 | 4938:bc8832c6696b |
---|---|
273 -- Produce the chat log view | 273 -- Produce the chat log view |
274 local function logs_page(event, path) | 274 local function logs_page(event, path) |
275 local request, response = event.request, event.response; | 275 local request, response = event.request, event.response; |
276 | 276 |
277 local room, date = path:match("^([^/]+)/([^/]*)/?$"); | 277 local room, date = path:match("^([^/]+)/([^/]*)/?$"); |
278 if not room then | |
279 response.headers.location = url.build({ path = path .. "/" }); | |
280 return 303; | |
281 end | |
278 room = nodeprep(room); | 282 room = nodeprep(room); |
279 if not room then | 283 if not room then |
280 return 400; | 284 return 400; |
281 elseif date == "" then | 285 elseif date == "" then |
282 return years_page(event, path); | 286 return years_page(event, path); |