# HG changeset patch
# User Jonas Schäfer <jonas@wielicki.name>
# Date 1671280076 -3600
# Node ID 85882735fd3319c464edefd6c02945254ff18b97
# Parent  4a5837591380f26ab3871ccbd4be518ce75a6346
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.

diff -r 4a5837591380 -r 85882735fd33 mod_http_muc_log/mod_http_muc_log.lua
--- 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, ... }