From 1abd0673b7550ffa0b0197d27a73ba487c4bf6e4 Mon Sep 17 00:00:00 2001 From: Sahid malik <106477157+Sahidmalik001@users.noreply.github.com> Date: Fri, 2 Aug 2024 22:45:40 +0530 Subject: [PATCH] Fix error in `RequestedChats` class parsing method Corrected the parsing logic in `_parse` method to handle different types of peer objects. Updated list handling for `chats` and `users` to ensure they are correctly populated. --- pyrogram/types/bots_and_keyboards/requested_chats.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyrogram/types/bots_and_keyboards/requested_chats.py b/pyrogram/types/bots_and_keyboards/requested_chats.py index b3ca39d6..554edd81 100644 --- a/pyrogram/types/bots_and_keyboards/requested_chats.py +++ b/pyrogram/types/bots_and_keyboards/requested_chats.py @@ -18,10 +18,10 @@ from ..object import Object from pyrogram import enums, raw, types -from typing import Union +from typing import Union, List class RequestedChats(Object): - """Contains information about a requested chats. + """Contains information about requested chats. Parameters: button_id (``int``): @@ -36,8 +36,8 @@ class RequestedChats(Object): def __init__( self, button_id: int, - chats: list["types.RequestedChat"] = None, - users: list["types.RequestedUser"] = None + chats: List["types.RequestedChat"] = None, + users: List["types.RequestedUser"] = None ): super().__init__()