mod_http_muc_log: Lazy nex/prev link generation
authorKim Alvefur <zash@zash.se>
Tue, 21 Nov 2017 00:46:00 +0100
changeset 2848 9fac07bba402
parent 2847 53a76c994fc3
child 2849 0de6ed2ae9bd
mod_http_muc_log: Lazy nex/prev link generation
mod_http_muc_log/mod_http_muc_log.lua
--- a/mod_http_muc_log/mod_http_muc_log.lua	Tue Nov 21 00:45:23 2017 +0100
+++ b/mod_http_muc_log/mod_http_muc_log.lua	Tue Nov 21 00:46:00 2017 +0100
@@ -242,6 +242,9 @@
 				break;
 			end
 		end
+	elseif lazy then
+		next_when = datetime.date(day_start + 86400);
+		prev_when = datetime.date(day_start - 86400);
 	else
 
 		module:log("debug", "Find next date with messages");