Diff

mod_muc_markers/mod_muc_markers.lua @ 4515:2e33eeafe962

mod_muc_markers: Prevent any markers from reaching the archive, even if untracked Original intention was to leave alone things that this module isn't handling. However markers in archives are just problematic without more advanced logic about what is markable and what is not. It also requires a more advanced query in mod_muc_rai to determine the latest markable message instead of the latest archived message. I'd rather keep the "is archivable" and "is markable" definition the same for simplicity. I don't want to introduce yet another set of rules for no reason. No markers in MAM.
author Matthew Wild <mwild1@gmail.com>
date Mon, 22 Mar 2021 15:55:02 +0000
parent 4356:ab2e15d3f1fa
child 4694:6c57b9e31586
line wrap: on
line diff
--- a/mod_muc_markers/mod_muc_markers.lua	Sun Mar 21 00:31:53 2021 +0100
+++ b/mod_muc_markers/mod_muc_markers.lua	Mon Mar 22 15:55:02 2021 +0000
@@ -74,11 +74,11 @@
 end);
 
 module:hook("muc-message-is-historic", function (event)
-	local marker = event.stanza:get_child(nil, xmlns_markers)
+	local marker = event.stanza:get_child(nil, xmlns_markers);
 
 	-- Prevent stanza from reaching the archive (it's just noise)
-	if marker and marker_element_names:contains(marker.name) then
-		return false
+	if marker then
+		return false;
 	end
 end);