# HG changeset patch # User Goffi # Date 1583097085 -3600 # Node ID 36c3f1c02d334d20cbba255f8bc88644489dadca # Parent f3c5e3caa17068833452ccbb7bef20bdaa5f0548 chat: renamed `MESS_KEY_MEDIA_TYPE` to `MESS_KEY_ATTACHMENTS_MEDIA_TYPE` following backend change diff -r f3c5e3caa170 -r 36c3f1c02d33 cagou/plugins/plugin_wid_chat.py --- a/cagou/plugins/plugin_wid_chat.py Sun Mar 01 22:11:25 2020 +0100 +++ b/cagou/plugins/plugin_wid_chat.py Sun Mar 01 22:11:25 2020 +0100 @@ -105,7 +105,7 @@ class AttachmentItem(BaseAttachmentItem): def get_symbol(self, data): - media_type = data.get(C.MESS_KEY_MEDIA_TYPE, '') + media_type = data.get(C.MESS_KEY_ATTACHMENTS_MEDIA_TYPE, '') main_type = media_type.split('/', 1)[0] if main_type == 'image': return "file-image" @@ -293,7 +293,7 @@ # we first separate images and other attachments, so we know if we need # to use an image collection for attachment in attachments: - media_type = attachment.get(C.MESS_KEY_MEDIA_TYPE, '') + media_type = attachment.get(C.MESS_KEY_ATTACHMENTS_MEDIA_TYPE, '') main_type = media_type.split('/', 1)[0] # GIF images are really badly handled by Kivy, the memory # consumption explode, and the images frequencies are not handled