diff sat/core/xmpp.py @ 3196:adf1aeaa0d37

core (constants): renamed `MESS_KEY_MEDIA_TYPE` to `MESS_KEY_ATTACHMENTS_MEDIA_TYPE`
author Goffi <goffi@goffi.org>
date Sat, 29 Feb 2020 16:55:22 +0100
parents e8ce30798d15
children f4a28767ec35
line wrap: on
line diff
--- a/sat/core/xmpp.py	Fri Feb 28 18:10:58 2020 +0100
+++ b/sat/core/xmpp.py	Sat Feb 29 16:55:22 2020 +0100
@@ -1137,10 +1137,10 @@
                 name = (Path(unquote(urlparse(attachment['url']).path)).name
                         or C.FILE_DEFAULT_NAME)
                 attachment["name"] = name
-            if C.MESS_KEY_MEDIA_TYPE not in attachment:
+            if C.MESS_KEY_ATTACHMENTS_MEDIA_TYPE not in attachment:
                 media_type = mimetypes.guess_type(attachment['name'], strict=False)[0]
                 if media_type:
-                    attachment[C.MESS_KEY_MEDIA_TYPE] = media_type
+                    attachment[C.MESS_KEY_ATTACHMENTS_MEDIA_TYPE] = media_type
         return data
 
     def skipEmptyMessage(self, data):