2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 12:57:52 +00:00

Accept usernames starting with "@"

This commit is contained in:
Dan 2017-12-25 11:49:59 +01:00
parent 3eaba9d2f4
commit aef1386a1a

View File

@ -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]
)