# HG changeset patch # User Kim Alvefur # Date 1488396857 -3600 # Node ID b61b0ff1c0f9e08a4fd68b1d9f6b3182b4116e8c # Parent fb1987d4ac6299b303e0eceaf6b04f0f89827e69 mod_http_muc_log: Fix prev/next date finding diff -r fb1987d4ac62 -r b61b0ff1c0f9 mod_http_muc_log/mod_http_muc_log.lua --- 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);