Use kwargs when calling nio.AsyncClient.upload()

This commit is contained in:
miruka 2020-05-21 20:52:42 -04:00
parent 921f75827d
commit bbd845c040
2 changed files with 6 additions and 7 deletions

View File

@ -1,6 +1,5 @@
# TODO
- uplaod/download use kwargs
- highlight messages being responded to
- highlight messages with mention
- add room members loading indicator

View File

@ -1115,12 +1115,12 @@ class MatrixClient(nio.AsyncClient):
mime = mime or await utils.guess_mime(data_provider(0, 0))
response, decryption_dict = await super().upload(
data_provider,
"application/octet-stream" if encrypt else mime,
filename,
encrypt,
monitor,
filesize,
data_provider = data_provider,
content_type = "application/octet-stream" if encrypt else mime,
filename = filename,
encrypt = encrypt,
monitor = monitor,
filesize = filesize,
)
return UploadReturn(response.content_uri, mime, decryption_dict)