--- a/mod_muc_markers/README.markdown Wed Jan 13 16:50:47 2021 +0000
+++ b/mod_muc_markers/README.markdown Fri Jan 15 14:07:01 2021 +0100
@@ -26,9 +26,11 @@
## Settings
-| Name | Description | Default |
-|-----------------|--------------------------------------------------------------|------------|
-| muc_marker_type | The type of marker to track (displayed/received/acknowledged)| "displayed"|
+| Name | Description | Default |
+|----------------------------|--------------------------------------------------------------------------------------|-------------|
+| muc_marker_summary_on_join | Whether a summary of all the latest markers should be sent to someone entering a MUC | "displayed" |
+| muc_marker_type | The type of marker to track (displayed/received/acknowledged) | "displayed" |
+
# Developers
--- a/mod_muc_markers/mod_muc_markers.lua Wed Jan 13 16:50:47 2021 +0000
+++ b/mod_muc_markers/mod_muc_markers.lua Fri Jan 15 14:07:01 2021 +0100
@@ -21,6 +21,7 @@
end
local marker_element_name = module:get_option_string("muc_marker_type", "displayed");
+local marker_summary_on_join = module:get_option_string("muc_marker_summary_on_join", true);
local rewrite_id_attribute = module:get_option_boolean("muc_marker_rewrite_id", false);
assert(marker_order[marker_element_name], "invalid marker name: "..marker_element_name);
@@ -96,6 +97,9 @@
-- Synthesize markers
if muc_marker_map_store.get_all then
module:hook("muc-occupant-session-new", function (event)
+ if not marker_summary_on_join then
+ return;
+ end
local room, to = event.room, event.stanza.attr.from;
local markers = muc_marker_map_store:get_all(room.jid);
if not markers then return end