Mercurial > libervia-pubsub
changeset 57:445a61f872b6
Use NodeCreationService for pgsql backend, too.
Fix onDiscoInfo().
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Fri, 05 Nov 2004 17:15:50 +0000 |
parents | 55fa890ef60b |
children | 3e2e0040e3e0 |
files | idavoll/idavoll.py |
diffstat | 1 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/idavoll/idavoll.py Fri Nov 05 17:14:42 2004 +0000 +++ b/idavoll/idavoll.py Fri Nov 05 17:15:50 2004 +0000 @@ -29,8 +29,12 @@ xmlstream.addObserver(IQ_SET, self.iqFallback, -1) def getFeatures(self, node): + features = [] + if not node: - return [NS_DISCO_ITEMS, NS_VERSION] + features.extend([NS_DISCO_ITEMS, NS_VERSION]) + + return features def onVersion(self, iq): iq.swapAttributeValues("to", "from") @@ -52,7 +56,7 @@ if hasattr(c, "getFeatures"): features.extend(c.getFeatures(node)) - if not features and not identities and not node: + if node and not features and not identities: xmpp_error.error_from_iq(iq, 'item-not-found') else: iq.swapAttributeValues("to", "from") @@ -110,10 +114,9 @@ bsc.setServiceParent(bs) component.IService(bsc).setServiceParent(sm) - if config['backend'] == 'memory': - bsc = b.NodeCreationService() - bsc.setServiceParent(bs) - component.IService(bsc).setServiceParent(sm) + bsc = b.NodeCreationService() + bsc.setServiceParent(bs) + component.IService(bsc).setServiceParent(sm) s = IdavollService() s.setServiceParent(sm)