Mercurial > libervia-pubsub
changeset 452:8da3db1e82a9
backend: advertise RSM on disco
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 02 Jul 2021 15:18:09 +0200 |
parents | 0e6e176cb572 |
children | 1a179ad10125 |
files | sat_pubsub/backend.py sat_pubsub/const.py |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/sat_pubsub/backend.py Sun Jun 06 19:42:57 2021 +0200 +++ b/sat_pubsub/backend.py Fri Jul 02 15:18:09 2021 +0200 @@ -1851,7 +1851,13 @@ # FIXME: upstream must be fixed so we can use custom (non pubsub#) disco features def getDiscoInfo(self, requestor, service, nodeIdentifier=''): - return [disco.DiscoFeature(pubsub.NS_ORDER_BY), disco.DiscoFeature(const.NS_FDP)] + return [ + disco.DiscoFeature(rsm.NS_RSM), + # cf. https://xmpp.org/extensions/xep-0060.html#subscriber-retrieve-returnsome + disco.DiscoFeature(const.NS_PUBSUB_RSM), + disco.DiscoFeature(pubsub.NS_ORDER_BY), + disco.DiscoFeature(const.NS_FDP) + ] def getDiscoItems(self, requestor, service, nodeIdentifier=''): return []
--- a/sat_pubsub/const.py Sun Jun 06 19:42:57 2021 +0200 +++ b/sat_pubsub/const.py Fri Jul 02 15:18:09 2021 +0200 @@ -55,6 +55,7 @@ NS_GROUPBLOG_PREFIX = 'urn:xmpp:groupblog:' NS_ITEM_CONFIG = "http://jabber.org/protocol/pubsub#item-config" NS_ATOM = "http://www.w3.org/2005/Atom" +NS_PUBSUB_RSM = "http://jabber.org/protocol/pubsub#rsm" NS_FORWARD = 'urn:xmpp:forward:0' NS_FDP = 'urn:xmpp:fdp:0' NS_SCHEMA_RESTRICT = 'https://salut-a-toi/protocol/schema#restrict:0'