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:
Goffi 2014-12-10 18:32:33 +01:00
commit 6e144c6458

View file

@ -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)