Diff

plugins/mod_muc_mam.lua @ 10119:29733134c76c

mod_muc_mam: Conditionally advertise MAM feature on rooms (fixes #1407)
author Kim Alvefur <zash@zash.se>
date Sat, 10 Aug 2019 16:01:42 +0200
parent 10111:0f335815244f
child 10415:360d574517b6
line wrap: on
line diff
--- a/plugins/mod_muc_mam.lua	Fri Aug 02 21:57:57 2019 +0200
+++ b/plugins/mod_muc_mam.lua	Sat Aug 10 16:01:42 2019 +0200
@@ -428,7 +428,9 @@
 module:add_feature(xmlns_mam);
 
 module:hook("muc-disco#info", function(event)
-	event.reply:tag("feature", {var=xmlns_mam}):up();
+	if archiving_enabled(event.room) then
+		event.reply:tag("feature", {var=xmlns_mam}):up();
+	end
 end);
 
 -- Cleanup