Software /
code /
prosody-modules
Changeset
4025:57b4cdeba318
mod_muc_markers: Prevent storage instead of broadcast
Restores the ability to see how far others have read.
Maybe this should be a setting?
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 05 May 2020 21:50:35 +0200 |
parents | 4024:95882b487ed2 |
children | 4026:e3964f876b5d |
files | mod_muc_markers/mod_muc_markers.lua |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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