# HG changeset patch # User Ralph Meijer # Date 1112977869 0 # Node ID 72c8812fa1b5a28ae08300b6c0fb64fac263ae03 # Parent 30c580286d279ac4f99c2548499907a5f6329577 Fix interpretation of JIDs. diff -r 30c580286d27 -r 72c8812fa1b5 idavoll/memory_storage.py --- a/idavoll/memory_storage.py Fri Apr 08 16:30:26 2005 +0000 +++ b/idavoll/memory_storage.py Fri Apr 08 16:31:09 2005 +0000 @@ -49,17 +49,17 @@ return defer.succeed(None) def get_affiliations(self, entity): - entity_full = entity.full() - return defer.succeed([(node.id, node._affiliations[entity_full]) + entity = entity.userhost() + return defer.succeed([(node.id, node._affiliations[entity]) for name, node in self._nodes.iteritems() - if entity_full in node._affiliations]) + if entity in node._affiliations]) def get_subscriptions(self, entity): subscriptions = [] for node in self._nodes.itervalues(): for subscriber, subscription in node._subscriptions.iteritems(): subscriber = jid.JID(subscriber) - if subscriber.userhostJID() == entity: + if subscriber.userhostJID() == entity.userhostJID(): subscriptions.append((node.id, subscriber, subscription.state)) @@ -71,7 +71,7 @@ def __init__(self, node_id, owner, config): self.id = node_id - self._affiliations = {owner.full(): 'owner'} + self._affiliations = {owner.userhost(): 'owner'} self._subscriptions = {} self._config = config