plugin XEP-0234: fixed mime type in buildFileElementFromDict
This commit is contained in:
parent
e414de9fa9
commit
ea351c6ff4
1 changed files with 6 additions and 0 deletions
|
|
@ -179,6 +179,12 @@ class XEP_0234(object):
|
||||||
if kwargs:
|
if kwargs:
|
||||||
file_data = file_data.copy()
|
file_data = file_data.copy()
|
||||||
file_data.update(kwargs)
|
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)
|
return self.buildFileElement(client, **file_data)
|
||||||
|
|
||||||
async def parseFileElement(
|
async def parseFileElement(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue