changeset 432:36c3f1c02d33

chat: renamed `MESS_KEY_MEDIA_TYPE` to `MESS_KEY_ATTACHMENTS_MEDIA_TYPE` following backend change
author Goffi <goffi@goffi.org>
date Sun, 01 Mar 2020 22:11:25 +0100
parents f3c5e3caa170
children aa204c813f07
files cagou/plugins/plugin_wid_chat.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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