From 1d4948309f2e45f41c0012ae588b1b443c5cb19d Mon Sep 17 00:00:00 2001 From: Shohih Abdul <50512936+DoellBarr@users.noreply.github.com> Date: Wed, 12 Apr 2023 14:03:22 +0700 Subject: [PATCH] Fix NameError on line 240 --- pyrogram/types/user_and_chats/chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/types/user_and_chats/chat.py b/pyrogram/types/user_and_chats/chat.py index 23ecea79..1cd30603 100644 --- a/pyrogram/types/user_and_chats/chat.py +++ b/pyrogram/types/user_and_chats/chat.py @@ -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 = []