From 969a2c0f555336f99c853a2bdec6cd114e892b3c Mon Sep 17 00:00:00 2001 From: wulan17 Date: Mon, 9 Jun 2025 19:45:17 +0700 Subject: [PATCH] pyrofork: fix RequestedChat type (#140) Signed-off-by: wulan17 --- pyrogram/types/bots_and_keyboards/requested_chat.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyrogram/types/bots_and_keyboards/requested_chat.py b/pyrogram/types/bots_and_keyboards/requested_chat.py index 6ccefe87..a096e02e 100644 --- a/pyrogram/types/bots_and_keyboards/requested_chat.py +++ b/pyrogram/types/bots_and_keyboards/requested_chat.py @@ -65,8 +65,10 @@ class RequestedChat(Object): "raw.types.PeerChannel" ] ) -> "RequestedChat": - if isinstance(request, raw.types.RequestedPeerChannel) or isinstance(request, raw.types.PeerChannel): + if getattr(request, "broadcast", None): type = enums.ChatType.CHANNEL + elif getattr(request, "megagroup", None): + type = enums.ChatType.SUPERGROUP else: type = enums.ChatType.GROUP photo = None