Mercurial > libervia-backend
comparison sat/plugins/plugin_sec_aesgcm.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 | 84b0c8b4dee0 |
children | 2c0628f3927e |
comparison
equal
deleted
inserted
replaced
3195:29d72336a40d | 3196:adf1aeaa0d37 |
---|---|
234 attachment = { | 234 attachment = { |
235 "url": link, | 235 "url": link, |
236 } | 236 } |
237 media_type = mimetypes.guess_type(path, strict=False)[0] | 237 media_type = mimetypes.guess_type(path, strict=False)[0] |
238 if media_type is not None: | 238 if media_type is not None: |
239 attachment[C.MESS_KEY_MEDIA_TYPE] = media_type | 239 attachment[C.MESS_KEY_ATTACHMENTS_MEDIA_TYPE] = media_type |
240 | 240 |
241 if mess_encrypted: | 241 if mess_encrypted: |
242 # we don't add the encrypted flag if the message itself is not | 242 # we don't add the encrypted flag if the message itself is not |
243 # encrypted, because the decryption key is part of the link, | 243 # encrypted, because the decryption key is part of the link, |
244 # so sending it over unencrypted channel is like having no | 244 # so sending it over unencrypted channel is like having no |