mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
pyrofork: fix RequestedChat type (#140)
Signed-off-by: wulan17 <wulan17@komodos.id>
This commit is contained in:
parent
be6c2ff437
commit
969a2c0f55
1 changed files with 3 additions and 1 deletions
|
|
@ -65,8 +65,10 @@ class RequestedChat(Object):
|
||||||
"raw.types.PeerChannel"
|
"raw.types.PeerChannel"
|
||||||
]
|
]
|
||||||
) -> "RequestedChat":
|
) -> "RequestedChat":
|
||||||
if isinstance(request, raw.types.RequestedPeerChannel) or isinstance(request, raw.types.PeerChannel):
|
if getattr(request, "broadcast", None):
|
||||||
type = enums.ChatType.CHANNEL
|
type = enums.ChatType.CHANNEL
|
||||||
|
elif getattr(request, "megagroup", None):
|
||||||
|
type = enums.ChatType.SUPERGROUP
|
||||||
else:
|
else:
|
||||||
type = enums.ChatType.GROUP
|
type = enums.ChatType.GROUP
|
||||||
photo = None
|
photo = None
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue