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 # TODO
- uplaod/download use kwargs
- highlight messages being responded to - highlight messages being responded to
- highlight messages with mention - highlight messages with mention
- add room members loading indicator - 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)) mime = mime or await utils.guess_mime(data_provider(0, 0))
response, decryption_dict = await super().upload( response, decryption_dict = await super().upload(
data_provider, data_provider = data_provider,
"application/octet-stream" if encrypt else mime, content_type = "application/octet-stream" if encrypt else mime,
filename, filename = filename,
encrypt, encrypt = encrypt,
monitor, monitor = monitor,
filesize, filesize = filesize,
) )
return UploadReturn(response.content_uri, mime, decryption_dict) return UploadReturn(response.content_uri, mime, decryption_dict)