diff cagou/plugins/plugin_wid_chat.py @ 418:8a9bfe3fb9c6

chat: use constant instead of hard-coded string for C.MESS_KEY_MEDIA_TYPE
author Goffi <goffi@goffi.org>
date Sun, 23 Feb 2020 17:49:53 +0100
parents 5b50b7ef2617
children 13884aac1220
line wrap: on
line diff
--- a/cagou/plugins/plugin_wid_chat.py	Sun Feb 23 17:16:27 2020 +0100
+++ b/cagou/plugins/plugin_wid_chat.py	Sun Feb 23 17:49:53 2020 +0100
@@ -99,7 +99,7 @@
     progress = properties.NumericProperty(0)
 
     def get_symbol(self, data):
-        media_type = data.get('media_type', '')
+        media_type = data.get(C.MESS_KEY_MEDIA_TYPE, '')
         main_type = media_type.split('/', 1)[0]
         if main_type == 'image':
             return "file-image"