Forced image upload to mimetype "image/jpg"
Test result: Image download working with all clients. Image preview is working with Element Android and FluffyChat but not in Element Web. Todo: Get mimetype from downloaded image or make sure its always jpg
This commit is contained in:
parent
92f89dc9a8
commit
91ac13cf29
|
@ -75,13 +75,14 @@ class TmdbBot(Plugin):
|
|||
|
||||
async def send_image(self, evt: MessageEvent, title, image) -> None:
|
||||
if image:
|
||||
mxc_uri = await self.client.upload_media(image)
|
||||
mxc_uri = await self.client.upload_media(image, mime_type='image/jpg')
|
||||
content = MediaMessageEventContent(
|
||||
msgtype=MessageType.IMAGE,
|
||||
body=f"Image {title}",
|
||||
url=f"{mxc_uri}",
|
||||
info=ImageInfo(mimetype='image/jpg'))
|
||||
await evt.respond(content)
|
||||
#await self.client.send_image(evt.room_id, url=mxc_uri, info=ImageInfo(mimetype='image/jpg'))
|
||||
|
||||
def construct_html_message(self, movie, overview_length = 200, cast_length = 3) -> str:
|
||||
if len(movie.overview) > overview_length:
|
||||
|
|
Loading…
Reference in a new issue