Changeset

11281:142fb655b885

mod_mam: Advertise extended MAM when archive storage is capable
author Kim Alvefur <zash@zash.se>
date Tue, 12 Jan 2021 19:25:29 +0100
parents 11280:e35e98541ca0
children 11282:cabb022f31c0
files doc/doap.xml plugins/mod_mam/mod_mam.lua
diffstat 2 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/doc/doap.xml	Tue Jan 12 19:00:44 2021 +0100
+++ b/doc/doap.xml	Tue Jan 12 19:25:29 2021 +0100
@@ -569,7 +569,7 @@
       <xmpp:SupportedXep>
         <xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0313.html"/>
         <xmpp:version>0.7.2</xmpp:version>
-        <xmpp:status>partial</xmpp:status>
+        <xmpp:status>complete</xmpp:status>
         <xmpp:since>0.10.0</xmpp:since>
         <xmpp:note>mod_mam, mod_muc_mam</xmpp:note>
       </xmpp:SupportedXep>
--- a/plugins/mod_mam/mod_mam.lua	Tue Jan 12 19:00:44 2021 +0100
+++ b/plugins/mod_mam/mod_mam.lua	Tue Jan 12 19:25:29 2021 +0100
@@ -567,8 +567,7 @@
 module:hook("message/bare", message_handler, 0);
 module:hook("message/full", message_handler, 0);
 
-local advertise_extended = module:get_option_boolean("mam_advertise_extend", false);
--- TODO delete feature flag option
+local advertise_extended = archive.caps and archive.caps.full_id_range and archive.caps.ids;
 
 module:hook("account-disco-info", function(event)
 	(event.reply or event.stanza):tag("feature", {var=xmlns_mam}):up();