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:
parent
3eaba9d2f4
commit
aef1386a1a
@ -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]
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user