mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 13:27:47 +00:00
Add support for blocked channels/supergroups. Fixes #56
This commit is contained in:
parent
1fdd2ef7df
commit
bd0fc27a61
@ -140,8 +140,8 @@ def parse_channel_chat(channel: types.Channel) -> pyrogram_types.Chat:
|
|||||||
id=int("-100" + str(channel.id)),
|
id=int("-100" + str(channel.id)),
|
||||||
type="supergroup" if channel.megagroup else "channel",
|
type="supergroup" if channel.megagroup else "channel",
|
||||||
title=channel.title,
|
title=channel.title,
|
||||||
username=channel.username,
|
username=getattr(channel, "username", None),
|
||||||
photo=parse_chat_photo(channel.photo)
|
photo=parse_chat_photo(getattr(channel, "photo", None))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user