changeset 1677:a125b11af711

tmp (wokkel.pubsub): implemented missing notifyRetract
author Goffi <goffi@goffi.org>
date Wed, 25 Nov 2015 15:35:21 +0100
parents a0810e0f386e
children c2d96f74105e
files src/tmp/wokkel/pubsub.py
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/tmp/wokkel/pubsub.py	Wed Nov 25 13:03:44 2015 +0100
+++ b/src/tmp/wokkel/pubsub.py	Wed Nov 25 15:35:21 2015 +0100
@@ -1469,6 +1469,18 @@
             self.send(message)
 
 
+    def notifyRetract(self, service, nodeIdentifier, notifications):
+        for subscriber, subscriptions, items in notifications:
+            message = self._createNotification('items', service,
+                                               nodeIdentifier, subscriber,
+                                               subscriptions)
+            for item in items:
+                retract = domish.Element((None, "retract"))
+                retract['id'] = item['id']
+                message.event.items.addChild(retract)
+            self.send(message)
+
+
     def notifyDelete(self, service, nodeIdentifier, subscribers,
                            redirectURI=None):
         for subscriber in subscribers: