diff -r 53052a610c67 -r c8a51d1bc96d mod_http_muc_log/mod_http_muc_log.lua --- a/mod_http_muc_log/mod_http_muc_log.lua Sun Feb 08 17:05:21 2015 +0100 +++ b/mod_http_muc_log/mod_http_muc_log.lua Mon Feb 09 00:47:38 2015 +0100 @@ -101,24 +101,25 @@ local dates, i = {}, 1; module:log("debug", "Find all dates with messages"); - local next_day; + local prev_day; repeat local iter = archive:find(room, { - ["start"] = next_day; + ["end"] = prev_day; limit = 1; with = "message