From 33e938b095795c1d33cea1ca4fe9902a64fd4bcf Mon Sep 17 00:00:00 2001 From: Andrea Spacca Date: Thu, 7 Jan 2021 11:57:36 +0100 Subject: [PATCH] bugfix --- pantalaimon/daemon.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pantalaimon/daemon.py b/pantalaimon/daemon.py index 31bbd00..887eee3 100755 --- a/pantalaimon/daemon.py +++ b/pantalaimon/daemon.py @@ -952,15 +952,19 @@ class ProxyDaemon: body=await response.transport_response.read(), ) - content = media_info.to_content(content["url"], + media_content = media_info.to_content(content["url"], file_name, content_msgtype, upload_info.mimetype ), - response = await client.room_send( - room_id, msgtype, content, txnid, ignore_unverified - ) + response = await client.room_send( + room_id, msgtype, media_content, txnid, ignore_unverified + ) + else: + response = await client.room_send( + room_id, msgtype, content, txnid, ignore_unverified + ) return web.Response( status=response.transport_response.status,