plugin XEP-0054: cache now use storage

bridge: getCardCache updated to manage profile
This commit is contained in:
Goffi 2011-11-20 15:56:51 +01:00
commit a88559442a
2 changed files with 28 additions and 18 deletions

View file

@ -217,8 +217,8 @@ class DBusBridgeFrontend(BridgeFrontend):
def getCard(self, target, profile_key='@DEFAULT@'):
return self.db_plugin_iface.getCard(target, profile_key)
def getCardCache(self, target):
return self.db_plugin_iface.getCardCache(target)
def getCardCache(self, target, profile_key='@DEFAULT@'):
return self.db_plugin_iface.getCardCache(target, profile_key)
def getAvatarFile(self, hash):
return self.db_plugin_iface.getAvatarFile(hash)

View file

@ -284,7 +284,7 @@ class QuickApp():
self.CM.update(from_jid, 'show', show)
self.CM.update(from_jid, 'statuses', statuses)
self.CM.update(from_jid, 'groups', groups)
cache = self.bridge.getCardCache(from_jid)
cache = self.bridge.getCardCache(from_jid, profile)
if cache.has_key('nick'):
self.CM.update(from_jid, 'nick', unicode(cache['nick']))
if cache.has_key('avatar'):