Fix GIF upload again.

Signed-off-by: Abdulkadir Furkan Şanlı <me@abdulocra.cy>
This commit is contained in:
Abdulkadir Furkan Şanlı 2024-01-23 18:19:54 +01:00
parent 580a89c86f
commit 242c0ba362
Signed by: afk
SSH Key Fingerprint: SHA256:s1hULLl4YWdqU501MUfGe1CAG/m1pf9Cs6vFsqeTNHk

View File

@ -213,7 +213,7 @@ async def message_callback(client, room, event):
) )
with open("./parker.gif", "rb") as gif_file: with open("./parker.gif", "rb") as gif_file:
response = await client.upload(gif_file, content_type="image/gif") response = await client.upload(gif_file, content_type="image/gif")
gif_uri = response.content_uri gif_uri = response[0]
await client.room_send( await client.room_send(
room_id=room_id, room_id=room_id,
message_type="m.room.message", message_type="m.room.message",