Merge pull request #174 from aspacca/fix-upload_and_send_image-error-msg

Fix upload_and_send_image error message
This commit is contained in:
Ville Ranki 2021-09-14 13:52:16 +03:00 committed by GitHub
commit cc65d630a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

2
bot.py
View File

@ -117,7 +117,7 @@ class Bot:
try:
matrix_uri, mimetype, w, h, size = await self.upload_image(url, blob=blob, no_cache=no_cache)
except (UploadFailed, ValueError):
return await self.send_text(room, f"Sorry. Something went wrong fetching {url} and uploading it to the image to matrix server :(")
return await self.send_text(room, f"Sorry. Something went wrong fetching {url} and uploading the image to matrix server :(")
return await self.send_image(room, matrix_uri, text, mimetype, w, h, size)