mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-03 14:04:51 +00:00
Fix getattr failing for ChannelForbidden objects
This commit is contained in:
parent
106fc0f458
commit
96af2ebcf2
1 changed files with 1 additions and 1 deletions
|
|
@ -215,7 +215,7 @@ def parse_channel_chat(channel: types.Channel) -> pyrogram_types.Chat:
|
||||||
title=channel.title,
|
title=channel.title,
|
||||||
username=getattr(channel, "username", None),
|
username=getattr(channel, "username", None),
|
||||||
photo=parse_chat_photo(getattr(channel, "photo", None)),
|
photo=parse_chat_photo(getattr(channel, "photo", None)),
|
||||||
restriction_reason=getattr(channel, "restriction_reason")
|
restriction_reason=getattr(channel, "restriction_reason", None)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue