mirror of https://github.com/sipwise/prosody.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
2.0 KiB
55 lines
2.0 KiB
From: Victor Seva <vseva@sipwise.com>
|
|
Date: Fri, 7 Apr 2017 11:12:23 +0200
|
|
Subject: TT#14278 mam: add all supported versions to disco
|
|
|
|
* sipwise app needs 'urn:xmpp:mam:1' at disco result
|
|
* upstream did implement supporting urn:xmpp_mam:[0-2] slightly different
|
|
looking through the code y noticed that if the disco has no 'to' it shows
|
|
the versions of mam supported
|
|
|
|
<!-- Out Fri 07 Apr 2017 10:53:38 AM CEST -->
|
|
<iq type='get'
|
|
id='info1'>
|
|
<query xmlns='http://jabber.org/protocol/disco#info'/>
|
|
</iq>
|
|
|
|
<!-- In Fri 07 Apr 2017 10:53:38 AM CEST -->
|
|
<iq id='info1' type='result' to='vseva@sipwise.com/Gajim' from='vseva@sipwise.com'>
|
|
<query xmlns='http://jabber.org/protocol/disco#info';>
|
|
<feature var='urn:xmpp:mam:0'/>
|
|
<feature var='urn:xmpp:mam:1'/>
|
|
<feature var='urn:xmpp:mam:2'/>
|
|
<feature var='urn:xmpp:sid:0'/>
|
|
<identity type='pep' category='pubsub'/>
|
|
<feature var='http://jabber.org/protocol/pubsub#publish'/>
|
|
</query>
|
|
</iq>
|
|
|
|
That is not what the XEP 0313 says:
|
|
<quote>
|
|
7. Determining support
|
|
If a server or other entity hosts archives and supports MAM queries, it MUST
|
|
advertise the 'urn:xmpp:mam:2' feature in response to Service Discovery
|
|
(XEP-0030) [15] requests made to archiving JIDs
|
|
(i.e. JIDs hosting an archive, such as users' bare JIDs):
|
|
</quote>
|
|
|
|
Change-Id: Ib79b6f2f60f71a80030bbd12b2eb893b60ac025d
|
|
---
|
|
plugins/mod_mam/mod_mam.lua | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua
|
|
index 61b4388..f8a2321 100644
|
|
--- a/plugins/mod_mam/mod_mam.lua
|
|
+++ b/plugins/mod_mam/mod_mam.lua
|
|
@@ -423,6 +423,8 @@ module:hook("message/bare", message_handler, priority);
|
|
module:hook("message/full", message_handler, priority);
|
|
|
|
module:add_feature(xmlns_mam0); -- COMPAT with XEP-0313 v 0.1
|
|
+module:add_feature(xmlns_mam1); -- COMPAT with XEP-0313 v 0.5
|
|
+module:add_feature(xmlns_mam2); -- COMPAT with XEP-0313 v 0.6
|
|
|
|
module:hook("account-disco-info", function(event)
|
|
(event.reply or event.stanza):tag("feature", {var=xmlns_mam0}):up();
|