save encoded avatar when receiving vCard from server

This commit is contained in:
Bronko 2018-04-08 20:58:24 +02:00
parent 879e03449c
commit 36b31259e7

View file

@ -227,6 +227,7 @@ class ProfileWindow:
photo_encoded = vcard_[i]['BINVAL'] photo_encoded = vcard_[i]['BINVAL']
if photo_encoded == '': if photo_encoded == '':
continue continue
self.avatar_encoded = photo_encoded
photo_decoded = base64.b64decode(photo_encoded.encode('utf-8')) photo_decoded = base64.b64decode(photo_encoded.encode('utf-8'))
pixbuf = gtkgui_helpers.get_pixbuf_from_data(photo_decoded) pixbuf = gtkgui_helpers.get_pixbuf_from_data(photo_decoded)
if pixbuf is None: if pixbuf is None: