# HG changeset patch # User Goffi # Date 1625231889 -7200 # Node ID 8da3db1e82a9d756fadc07be95daac1ae5ad588b # Parent 0e6e176cb5723c9cc125bde723c7feb293382718 backend: advertise RSM on disco diff -r 0e6e176cb572 -r 8da3db1e82a9 sat_pubsub/backend.py --- 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 [] diff -r 0e6e176cb572 -r 8da3db1e82a9 sat_pubsub/const.py --- 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'