aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_muc_mam.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-08-10 16:01:42 +0200
committerKim Alvefur <zash@zash.se>2019-08-10 16:01:42 +0200
commit5976d3fc664719dfddb539c660465caa961588a6 (patch)
tree22460166cb7b452f5f235ea7f8d6c7705111c700 /plugins/mod_muc_mam.lua
parentfabd896892e40eda501c12704025df7cb7c16654 (diff)
downloadprosody-5976d3fc664719dfddb539c660465caa961588a6.tar.gz
prosody-5976d3fc664719dfddb539c660465caa961588a6.zip
mod_muc_mam: Conditionally advertise MAM feature on rooms (fixes #1407)
Diffstat (limited to 'plugins/mod_muc_mam.lua')
-rw-r--r--plugins/mod_muc_mam.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_muc_mam.lua b/plugins/mod_muc_mam.lua
index 387f6a5d..7fc9fabf 100644
--- a/plugins/mod_muc_mam.lua
+++ b/plugins/mod_muc_mam.lua
@@ -428,7 +428,9 @@ end
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