Diff

mod_http_muc_log/mod_http_muc_log.lua @ 5116:85882735fd33

mod_http_muc_log: make default presence visibility configurable This helps with reducing noise in some public places, such as the XSF MUC logs. As requested by emus.
author Jonas Schäfer <jonas@wielicki.name>
date Sat, 17 Dec 2022 13:27:56 +0100
parent 4993:f36d15107c15
child 5117:2b94ee74d1f1
line wrap: on
line diff
--- a/mod_http_muc_log/mod_http_muc_log.lua	Thu Apr 28 20:22:03 2022 +0200
+++ b/mod_http_muc_log/mod_http_muc_log.lua	Sat Dec 17 13:27:56 2022 +0100
@@ -21,6 +21,7 @@
 end
 
 local use_oob = module:get_option_boolean(module.name .. "_show_images", false);
+local show_presence_by_default = module:get_option_boolean(module.name .. "_show_presence_by_default", true);
 module:depends"http";
 
 local template;
@@ -136,7 +137,7 @@
 			return data.p == "h"
 		end
 	end
-	return false;
+	return not show_presence_by_default;
 end
 
 local function get_dates(room) --> { integer, ... }