Skip to content

Commit b1250e6

Browse files
committed
Fix accessing non-existent attribute
Closes #865
1 parent 149685f commit b1250e6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • pyrogram/types/user_and_chats

pyrogram/types/user_and_chats/chat.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ def _parse_channel_chat(client, channel: raw.types.Channel) -> "Chat":
247247
is_fake=getattr(channel, "fake", None),
248248
title=channel.title,
249249
username=getattr(channel, "username", None),
250-
photo=types.ChatPhoto._parse(client, getattr(channel, "photo", None), peer_id, channel.access_hash),
250+
photo=types.ChatPhoto._parse(client, getattr(channel, "photo", None), peer_id,
251+
getattr(channel, "access_hash", 0)),
251252
restrictions=types.List([types.Restriction._parse(r) for r in restriction_reason]) or None,
252253
permissions=types.ChatPermissions._parse(getattr(channel, "default_banned_rights", None)),
253254
members_count=getattr(channel, "participants_count", None),

0 commit comments

Comments
 (0)