Changeset

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
parents 10118:199dae5b6f11
children 10120:756b8821007a
files plugins/mod_muc_mam.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
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