Mercurial > prosody-modules
diff mod_http_muc_log/mod_http_muc_log.lua @ 2593:b61b0ff1c0f9
mod_http_muc_log: Fix prev/next date finding
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 01 Mar 2017 20:34:17 +0100 |
parents | fb1987d4ac62 |
children | cd5781ca782d |
line wrap: on
line diff
--- a/mod_http_muc_log/mod_http_muc_log.lua Wed Mar 01 20:33:58 2017 +0100 +++ b/mod_http_muc_log/mod_http_muc_log.lua Wed Mar 01 20:34:17 2017 +0100 @@ -225,7 +225,7 @@ else module:log("debug", "Find next date with messages"); - local next_when = find_once(room, { after = last }, 3); + next_when = find_once(room, { after = last }, 3); if next_when then next_when = datetime.date(next_when); module:log("debug", "Next message: %s", next_when); @@ -234,7 +234,7 @@ end module:log("debug", "Find prev date with messages"); - local prev_when = find_once(room, { before = first, reverse = true }, 3); + prev_when = find_once(room, { before = first, reverse = true }, 3); if prev_when then prev_when = datetime.date(prev_when); module:log("debug", "Previous message: %s", prev_when);