diff --git a/pyrogram/client/methods/chats/iter_dialogs.py b/pyrogram/client/methods/chats/iter_dialogs.py index 8265a9df..80ce44f5 100644 --- a/pyrogram/client/methods/chats/iter_dialogs.py +++ b/pyrogram/client/methods/chats/iter_dialogs.py @@ -29,7 +29,7 @@ class IterDialogs(BaseClient): async def iter_dialogs( self, limit: int = 0, - offset_date: int = None + offset_date: int = 0 ) -> Optional[Generator["pyrogram.Dialog", None, None]]: """Iterate through a user's dialogs sequentially. diff --git a/pyrogram/client/types/inline_mode/inline_query_result_photo.py b/pyrogram/client/types/inline_mode/inline_query_result_photo.py index ffcc21c0..35b8a874 100644 --- a/pyrogram/client/types/inline_mode/inline_query_result_photo.py +++ b/pyrogram/client/types/inline_mode/inline_query_result_photo.py @@ -91,7 +91,7 @@ class InlineQueryResultPhoto(InlineQueryResult): self.reply_markup = reply_markup self.input_message_content = input_message_content - def write(self): + async def write(self): photo = types.InputWebDocument( url=self.photo_url, size=0, @@ -117,11 +117,11 @@ class InlineQueryResultPhoto(InlineQueryResult): thumb=thumb, content=photo, send_message=( - self.input_message_content.write(self.reply_markup) + await self.input_message_content.write(self.reply_markup) if self.input_message_content else types.InputBotInlineMessageMediaAuto( reply_markup=self.reply_markup.write() if self.reply_markup else None, - **(Parser(None)).parse(self.caption, self.parse_mode) + **await(Parser(None)).parse(self.caption, self.parse_mode) ) ) )