plugin XEP-0060: handle purge notifications
This commit is contained in:
parent
f2a06bbcbf
commit
42979a7140
1 changed files with 15 additions and 1 deletions
|
|
@ -1529,6 +1529,19 @@ class SatPubSubClient(rsm.PubSubClient):
|
|||
event.sender.full(), event.nodeIdentifier, C.PS_DELETE, [], client.profile
|
||||
)
|
||||
|
||||
def purgeReceived(self, event):
|
||||
log.debug(("Publish node purged"))
|
||||
for callback in self._getNodeCallbacks(event.nodeIdentifier, C.PS_PURGE):
|
||||
d = utils.asDeferred(callback, self.parent, event)
|
||||
d.addErrback(lambda f: log.error(
|
||||
f"Error while running purge event callback {callback}: {f}"
|
||||
))
|
||||
client = self.parent
|
||||
if (event.sender, event.nodeIdentifier) in client.pubsub_watching:
|
||||
self.host.bridge.psEventRaw(
|
||||
event.sender.full(), event.nodeIdentifier, C.PS_PURGE, [], client.profile
|
||||
)
|
||||
|
||||
def subscriptions(self, service, nodeIdentifier, sender=None):
|
||||
"""Return the list of subscriptions to the given service and node.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue