2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 13:27:47 +00:00

Add missing await

This commit is contained in:
Dan 2019-12-06 21:14:15 +01:00 committed by GitHub
parent c929ce3097
commit 353811ebd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,7 @@ class SetChatPhoto(BaseClient):
peer = await self.resolve_peer(chat_id) peer = await self.resolve_peer(chat_id)
if os.path.exists(photo): if os.path.exists(photo):
photo = types.InputChatUploadedPhoto(file=self.save_file(photo)) photo = types.InputChatUploadedPhoto(file=await self.save_file(photo))
else: else:
photo = utils.get_input_media_from_file_id(photo) photo = utils.get_input_media_from_file_id(photo)
photo = types.InputChatPhoto(id=photo.id) photo = types.InputChatPhoto(id=photo.id)