mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Pyrofork: fix for python3.9 and below
TypeError: Subscripted generics cannot be used with class and instance checks Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
b6751fa86c
commit
b092130f65
1 changed files with 1 additions and 1 deletions
|
|
@ -879,7 +879,7 @@ class Message(Object, Update):
|
|||
document = types.Document._parse(client, doc, file_name)
|
||||
media_type = enums.MessageMediaType.DOCUMENT
|
||||
elif isinstance(media, raw.types.MessageMediaWebPage):
|
||||
if isinstance(media.webpage, Union[raw.types.WebPage, raw.types.WebPageEmpty]):
|
||||
if isinstance(media.webpage, raw.types.WebPage) or isinstance(media.webpage, raw.types.WebPageEmpty):
|
||||
web_page_preview = types.WebPagePreview._parse(client, media, message.invert_media)
|
||||
media_type = enums.MessageMediaType.WEB_PAGE_PREVIEW
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue