core: improved roster management + misc:
- updated methods to no use anymore methods deprecated in Wokkel
- use of full jid when it make sense instead of bare jid
- getContacts, updateContact and delContact are now asynchronous
This commit is contained in:
parent
eaa0f83237
commit
6e144c6458
1 changed files with 102 additions and 98 deletions
|
|
@ -102,9 +102,9 @@ class XEP_0054(object):
|
|||
# the current naive approach keeps a map between all jids of all profiles
|
||||
# in persistent cache, and check if cached jid are in roster, then put avatar
|
||||
# hashs in memory.
|
||||
for _jid in client.roster.getBareJids() + [client.jid.userhost()]:
|
||||
if _jid in self.avatars_cache:
|
||||
self.host.memory.updateEntityData(jid.JID(_jid), "avatar", self.avatars_cache[_jid], client.profile)
|
||||
for _jid in client.roster.getJids() + [client.jid]:
|
||||
if _jid.userhost() in self.avatars_cache:
|
||||
self.host.memory.updateEntityData(_jid, "avatar", self.avatars_cache[_jid.userhost()], client.profile)
|
||||
|
||||
def profileConnected(self, profile):
|
||||
client = self.host.getClient(profile)
|
||||
|
|
|
|||
Loading…
Reference in a new issue