comparison sat/plugins/plugin_comp_ap_gateway/pubsub_service.py @ 3792:865167c34b82

comp AP gateway: convert pubsub item retractation to AP `Delete` activity: when an item `retract` is received from a node from which an AP actor is subscribed, a corresponding `Delete` activity is created and sent to AP followers. Trying to retract an item from a virtual node of the gateway pubsub service now return a `forbidden` stanza error (those nodes are handled on AP side and thus are not owned by XMPP entities). rel 367
author Goffi <goffi@goffi.org>
date Fri, 17 Jun 2022 14:15:23 +0200
parents 125c7043b277
children 6329ee6b6df4
comparison
equal deleted inserted replaced
3791:c61233f51b86 3792:865167c34b82
253 kwargs["parser"] = parser 253 kwargs["parser"] = parser
254 return await self.apg.getAPItems(collection, **kwargs) 254 return await self.apg.getAPItems(collection, **kwargs)
255 255
256 @ensure_deferred 256 @ensure_deferred
257 async def retract(self, requestor, service, nodeIdentifier, itemIdentifiers): 257 async def retract(self, requestor, service, nodeIdentifier, itemIdentifiers):
258 raise NotImplementedError 258 raise error.StanzaError("forbidden")
259 259
260 @ensure_deferred 260 @ensure_deferred
261 async def subscribe(self, requestor, service, nodeIdentifier, subscriber): 261 async def subscribe(self, requestor, service, nodeIdentifier, subscriber):
262 # TODO: handle comments nodes 262 # TODO: handle comments nodes
263 client = self.apg.client 263 client = self.apg.client