# HG changeset patch # User Goffi # Date 1598338295 -7200 # Node ID 3dc8835d96cc5495a0428f5aec539e699bf4c50a # Parent 7515e1878004825be7eb6434a2bad98de7226ab9 plugin XEP-0234: fixed mime type in `buildFileElementFromDict` diff -r 7515e1878004 -r 3dc8835d96cc sat/plugins/plugin_xep_0234.py --- a/sat/plugins/plugin_xep_0234.py Sat Aug 15 22:54:42 2020 +0200 +++ b/sat/plugins/plugin_xep_0234.py Tue Aug 25 08:51:35 2020 +0200 @@ -179,6 +179,12 @@ if kwargs: file_data = file_data.copy() file_data.update(kwargs) + try: + file_data["mime_type"] = ( + f'{file_data.pop("media_type")}/{file_data.pop("media_subtype")}' + ) + except KeyError: + pass return self.buildFileElement(client, **file_data) async def parseFileElement(