aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-01-12 19:25:29 +0100
committerKim Alvefur <zash@zash.se>2021-01-12 19:25:29 +0100
commitbe492e057b00c0f21e54b8e8d881ee2314f8534f (patch)
tree21a8bf3b234c36cea6b7a95b431604e45117ae9e
parent2d03793897dcdb9f3b6463cdbfb7b35bb97e7a2c (diff)
downloadprosody-be492e057b00c0f21e54b8e8d881ee2314f8534f.tar.gz
prosody-be492e057b00c0f21e54b8e8d881ee2314f8534f.zip
mod_mam: Advertise extended MAM when archive storage is capable
-rw-r--r--doc/doap.xml2
-rw-r--r--plugins/mod_mam/mod_mam.lua3
2 files changed, 2 insertions, 3 deletions
diff --git a/doc/doap.xml b/doc/doap.xml
index 57c8c97d..ff037cd7 100644
--- a/doc/doap.xml
+++ b/doc/doap.xml
@@ -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>
diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua
index 38ef35f6..b5e756e3 100644
--- a/plugins/mod_mam/mod_mam.lua
+++ b/plugins/mod_mam/mod_mam.lua
@@ -567,8 +567,7 @@ module:hook("pre-message/full", c2s_message_handler, 0);
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();