mod_muc_markers: Prevent storage instead of broadcast
Restores the ability to see how far others have read.
Maybe this should be a setting?
--- a/mod_muc_markers/mod_muc_markers.lua Tue May 19 14:06:42 2020 +0100
+++ b/mod_muc_markers/mod_muc_markers.lua Tue May 05 21:50:35 2020 +0200
@@ -44,8 +44,15 @@
module:log("warn", "New marker for %s: %s", event.occupant.bare_jid, marker.attr.id);
muc_marker_map_store:set(event.occupant.bare_jid, event.room.jid, marker.attr.id);
- -- Prevent stanza from reaching the room (it's just noise)
- return true;
+end);
+
+module:hook("muc-message-is-historic", function (event)
+ local marker = event.stanza:get_child("received", xmlns_markers);
+
+ -- Prevent stanza from reaching the archive (it's just noise)
+ if marker then
+ return false
+ end
end);
-- Public API