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.

This commit is contained in:
Sahid malik 2024-08-02 22:45:40 +05:30 committed by GitHub
parent 69179879fc
commit 1abd0673b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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__()