changeset 2510:4001aa395a04

plugin XEP-0054: use .jpg instead of .jpe for jpeg files
author Goffi <goffi@goffi.org>
date Fri, 02 Mar 2018 17:43:41 +0100 (2018-03-02)
parents d485e9416493
children 20a5e7db0609
files src/plugins/plugin_xep_0054.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0054.py	Fri Mar 02 17:40:09 2018 +0100
+++ b/src/plugins/plugin_xep_0054.py	Fri Mar 02 17:43:41 2018 +0100
@@ -226,6 +226,8 @@
 
             ext = mimetypes.guess_extension(mime_type, strict=False)
             assert ext is not None
+            if ext == u'.jpe':
+                ext = u'.jpg'
             log.debug(u'photo of type {type} with extension {ext} found [{jid}]'.format(
                     type=mime_type, ext=ext, jid=entity_jid.full()))
         try: