2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 05:18:10 +00:00

Add support for blocked channels/supergroups. Fixes #56

This commit is contained in:
Dan 2018-04-26 11:09:19 +02:00
parent 1fdd2ef7df
commit bd0fc27a61

View File

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