2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 21:07:59 +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: else:
try: try:
return ( return (
self.peers_by_username[chat_id.lower()] self.peers_by_username[chat_id.lower().strip("@")]
if isinstance(chat_id, str) if isinstance(chat_id, str)
else self.peers_by_id[chat_id] else self.peers_by_id[chat_id]
) )