Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
10118:199dae5b6f11 | 10119:29733134c76c |
---|---|
426 -- And role/affiliation changes? | 426 -- And role/affiliation changes? |
427 | 427 |
428 module:add_feature(xmlns_mam); | 428 module:add_feature(xmlns_mam); |
429 | 429 |
430 module:hook("muc-disco#info", function(event) | 430 module:hook("muc-disco#info", function(event) |
431 event.reply:tag("feature", {var=xmlns_mam}):up(); | 431 if archiving_enabled(event.room) then |
432 event.reply:tag("feature", {var=xmlns_mam}):up(); | |
433 end | |
432 end); | 434 end); |
433 | 435 |
434 -- Cleanup | 436 -- Cleanup |
435 | 437 |
436 if cleanup_after ~= "never" then | 438 if cleanup_after ~= "never" then |