Mercurial > libervia-pubsub
diff sat_pubsub/backend.py @ 261:65d4fed44edf
fixed notifications (a key was missing in data in some cases)
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 17 Jun 2013 01:14:31 +0200 |
parents | f0cd02c032b3 |
children | 9dfd3890e646 |
line wrap: on
line diff
--- a/sat_pubsub/backend.py Mon May 06 00:26:37 2013 +0200 +++ b/sat_pubsub/backend.py Mon Jun 17 01:14:31 2013 +0200 @@ -391,8 +391,9 @@ if items: reactor.callLater(0, self.dispatch, {'items': items, - 'nodeIdentifier': node.nodeIdentifier, - 'subscription': subscription}, + 'node': node, + 'subscription': subscription, + }, '//event/pubsub/notify') config = node.getConfiguration() @@ -670,7 +671,7 @@ if affiliation != 'owner': raise error.Forbidden() - data = {'nodeIdentifier': node.nodeIdentifier, + data = {'node': node, 'redirectURI': redirectURI} d = defer.DeferredList([cb(data) @@ -867,7 +868,7 @@ def _preDelete(self, data): - nodeIdentifier = data['nodeIdentifier'] + nodeIdentifier = data['node'].nodeIdentifier redirectURI = data.get('redirectURI', None) d = self.backend.getSubscribers(nodeIdentifier) d.addCallback(lambda subscribers: self.pubsubService.notifyDelete(