From aef1386a1a1c68f98cbc97bfa36364b478179af8 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Mon, 25 Dec 2017 11:49:59 +0100 Subject: [PATCH] Accept usernames starting with "@" --- pyrogram/client/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index b562379f..aef1fbdc 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -388,7 +388,7 @@ class Client: else: try: return ( - self.peers_by_username[chat_id.lower()] + self.peers_by_username[chat_id.lower().strip("@")] if isinstance(chat_id, str) else self.peers_by_id[chat_id] )