Mercurial > libervia-backend
comparison src/memory/memory.py @ 553:2b3e3349f6a4
core: fixed presence cache error
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 06 Dec 2012 22:11:41 +0100 |
parents | 2c4016921403 |
children | 14dcbcdb6222 |
comparison
equal
deleted
inserted
replaced
552:6970ab58b020 | 553:2b3e3349f6a4 |
---|---|
709 if not profile: | 709 if not profile: |
710 error(_('Asking contacts for a non-existant profile')) | 710 error(_('Asking contacts for a non-existant profile')) |
711 return {} | 711 return {} |
712 entities_presence = {} | 712 entities_presence = {} |
713 for entity in self.entitiesCache[profile]: | 713 for entity in self.entitiesCache[profile]: |
714 # if entity exists, "presence" key must exist | 714 if "presence" in self.entitiesCache[profile][entity]: |
715 entities_presence[entity] = self.entitiesCache[profile][entity]["presence"] | 715 entities_presence[entity] = self.entitiesCache[profile][entity]["presence"] |
716 | 716 |
717 debug ("Memory getPresenceStatus (%s)", entities_presence) | 717 debug ("Memory getPresenceStatus (%s)", entities_presence) |
718 return entities_presence | 718 return entities_presence |
719 | 719 |
720 def setPresenceStatus(self, entity_jid, show, priority, statuses, profile_key): | 720 def setPresenceStatus(self, entity_jid, show, priority, statuses, profile_key): |