pyrofork: fix RequestedChat type (#140)

Signed-off-by: wulan17 <wulan17@komodos.id>
This commit is contained in:
wulan17 2025-06-09 19:45:17 +07:00
parent be6c2ff437
commit 969a2c0f55
No known key found for this signature in database
GPG key ID: 737814D4B5FF0420

View file

@ -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