From f8b272a9255f70d3158049152f488bf7fafe3118 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Thu, 5 Apr 2018 11:31:01 +0200 Subject: [PATCH] Allow passing phone numbers with white spaces E.g.: "+39 123 456 7890" --- 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 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)