Commit e3dacee0 authored by Dan Pascu's avatar Dan Pascu

Use sha1 instead of sha512 to identify icon content

parent 892bc7af
......@@ -419,7 +419,7 @@ class MainWindow(base_class, ui_class):
icon = icon_manager.store_file('avatar', filename)
icon_contents = icon_manager.get_image('avatar')
if icon_contents is not None:
hash = hashlib.sha512(icon_contents).hexdigest()
hash = hashlib.sha1(icon_contents).hexdigest()
blink_settings.presence.icon = IconDescriptor(FileURL(icon.filename), hash)
else:
icon_manager.remove('avatar')
......
......@@ -268,7 +268,7 @@ class PresencePublicationHandler(object):
blink_settings.save()
if status_icon:
icon_hash = hashlib.sha512(status_icon.data).hexdigest()
icon_hash = hashlib.sha1(status_icon.data).hexdigest()
icon_desc = IconDescriptor(notification.sender.status_icon.uri, icon_hash)
if not blink_settings.presence.icon or blink_settings.presence.icon.etag != icon_hash:
icon = icon_manager.store_data('avatar', status_icon.data)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment