update avatar files when we update our vcard

This commit is contained in:
Yann Leboulanger 2006-04-11 18:28:31 +00:00
parent f57cd7b0d3
commit be246e984d
1 changed files with 2 additions and 0 deletions

View File

@ -854,6 +854,8 @@ class ConnectionVcard:
vcard['PHOTO'].has_key('BINVAL'):
photo = vcard['PHOTO']['BINVAL']
photo_decoded = base64.decodestring(photo)
our_jid = gajim.get_jid_from_account(self.name)
gajim.interface.save_avatar_files(our_jid, photo_decoded)
avatar_sha = sha.sha(photo_decoded).hexdigest()
iq2.getTag('PHOTO').setTagData('SHA', avatar_sha)