Fix NameError on line 240

This commit is contained in:
Shohih Abdul 2023-04-12 14:03:22 +07:00 committed by GitHub
parent caf80f239b
commit 1d4948309f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -237,7 +237,7 @@ class Chat(Object):
@staticmethod
def _parse_chat_chat(client, chat: raw.types.Chat) -> "Chat":
peer_id = -chat.id
active_usernames = getattr(channel, "usernames", [])
active_usernames = getattr(chat, "usernames", [])
usernames = None
if len(active_usernames) >= 1:
usernames = []