Mercurial > libervia-pubsub
comparison idavoll/gateway.py @ 224:55b45c7dccb4
Upon gateway subscription to the root node, don't retrieve items.
The root node is always a collection node, which cannot have items by itself.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Sun, 13 Feb 2011 21:26:07 +0100 |
parents | 3c45208678fa |
children |
comparison
equal
deleted
inserted
replaced
223:0eafdced5f24 | 224:55b45c7dccb4 |
---|---|
414 self._postTo([callback], jid, nodeIdentifier, atomEntries[0], | 414 self._postTo([callback], jid, nodeIdentifier, atomEntries[0], |
415 'application/atom+xml;type=entry') | 415 'application/atom+xml;type=entry') |
416 | 416 |
417 def subscribeOrItems(hasCallbacks): | 417 def subscribeOrItems(hasCallbacks): |
418 if hasCallbacks: | 418 if hasCallbacks: |
419 if not nodeIdentifier: | |
420 return None | |
419 d = self.items(jid, nodeIdentifier, 1) | 421 d = self.items(jid, nodeIdentifier, 1) |
420 d.addCallback(callbackForLastItem) | 422 d.addCallback(callbackForLastItem) |
421 else: | 423 else: |
422 d = self.subscribe(jid, nodeIdentifier, self.jid) | 424 d = self.subscribe(jid, nodeIdentifier, self.jid) |
423 | 425 |