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:
commit
cc65d630a0
2
bot.py
2
bot.py
|
@ -117,7 +117,7 @@ class Bot:
|
||||||
try:
|
try:
|
||||||
matrix_uri, mimetype, w, h, size = await self.upload_image(url, blob=blob, no_cache=no_cache)
|
matrix_uri, mimetype, w, h, size = await self.upload_image(url, blob=blob, no_cache=no_cache)
|
||||||
except (UploadFailed, ValueError):
|
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)
|
return await self.send_image(room, matrix_uri, text, mimetype, w, h, size)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue