# HG changeset patch # User Kim Alvefur # Date 1565445702 -7200 # Node ID 29733134c76cde78551e7987ee30b01fb8333d80 # Parent 199dae5b6f11dbc0e8f4d7847e13b75508c0f1bc mod_muc_mam: Conditionally advertise MAM feature on rooms (fixes #1407) diff -r 199dae5b6f11 -r 29733134c76c plugins/mod_muc_mam.lua --- 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