diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index be04db75..a7a91f93 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -961,7 +961,7 @@ class Client: except (AttributeError, binascii.Error, struct.error): pass - peer_id = peer_id.lower().strip("@+") + peer_id = re.sub(r"[@+\s]", "", peer_id.lower()) try: int(peer_id)