Fix accessing non-existent attribute

Closes #865
This commit is contained in:
Dan 2022-01-29 13:02:32 +01:00
parent 149685f9d3
commit b1250e6575

View File

@ -247,7 +247,8 @@ class Chat(Object):
is_fake=getattr(channel, "fake", None),
title=channel.title,
username=getattr(channel, "username", None),
photo=types.ChatPhoto._parse(client, getattr(channel, "photo", None), peer_id, channel.access_hash),
photo=types.ChatPhoto._parse(client, getattr(channel, "photo", None), peer_id,
getattr(channel, "access_hash", 0)),
restrictions=types.List([types.Restriction._parse(r) for r in restriction_reason]) or None,
permissions=types.ChatPermissions._parse(getattr(channel, "default_banned_rights", None)),
members_count=getattr(channel, "participants_count", None),