Software /
code /
prosody-modules
Comparison
mod_http_muc_log/mod_http_muc_log.lua @ 3595:00a848ede42d
mod_http_muc_log: Preserve ?query part in redirect
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 13 May 2019 11:13:19 +0200 |
parent | 3594:b66111f75e4b |
child | 3596:6e529f53b3c3 |
comparison
equal
deleted
inserted
replaced
3594:b66111f75e4b | 3595:00a848ede42d |
---|---|
260 elseif is_open == false then | 260 elseif is_open == false then |
261 return 403; | 261 return 403; |
262 end | 262 end |
263 if date == "latest" then | 263 if date == "latest" then |
264 local last_day = find_once(room, { reverse = true }, 3); | 264 local last_day = find_once(room, { reverse = true }, 3); |
265 response.headers.location = datetime.date(last_day); | 265 response.headers.location = url.build({ path = datetime.date(last_day), query = request.url.query }); |
266 return 303; | 266 return 303; |
267 end | 267 end |
268 local day_start = datetime.parse(date.."T00:00:00Z"); | 268 local day_start = datetime.parse(date.."T00:00:00Z"); |
269 if not day_start then | 269 if not day_start then |
270 module:log("debug", "Invalid date format: %q", date); | 270 module:log("debug", "Invalid date format: %q", date); |