Fix set_avatar_from_file()

This commit is contained in:
miruka 2019-11-26 15:52:04 -04:00
parent 2b288bdfc6
commit 2754fff0df

View File

@ -600,7 +600,7 @@ class MatrixClient(nio.AsyncClient):
if mime.split("/")[0] != "image": if mime.split("/")[0] != "image":
raise BadMimeType(wanted="image/*", got=mime) raise BadMimeType(wanted="image/*", got=mime)
mxc, *_ = await self.upload_file(path, mime, Path(path).name) mxc, *_ = await self.upload(path, mime, Path(path).name)
await self.set_avatar(mxc) await self.set_avatar(mxc)