# HG changeset patch # User Kim Alvefur # Date 1588708235 -7200 # Node ID 57b4cdeba318f2cfbde4940eeaa2b11c98ea672e # Parent 95882b487ed26606f6d3f3f22f01a1f85f466be5 mod_muc_markers: Prevent storage instead of broadcast Restores the ability to see how far others have read. Maybe this should be a setting? diff -r 95882b487ed2 -r 57b4cdeba318 mod_muc_markers/mod_muc_markers.lua --- 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