From 2944181b388aa687cf7af7083c888e574fafb248 Mon Sep 17 00:00:00 2001 From: YoilyL Date: Wed, 13 Jun 2018 17:54:48 +0300 Subject: [PATCH 1/2] fixed session mistake use new session when uploading files instead of main session --- 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 73f45966..5e6324fc 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -1051,7 +1051,7 @@ class Client(Methods, BaseClient): bytes=chunk ) - assert self.send(rpc), "Couldn't upload file" + assert session.send(rpc), "Couldn't upload file" if is_missing_part: return From 329bac6ab00ede9f4b677ca412bb537ba19be5b1 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Wed, 13 Jun 2018 20:53:31 +0200 Subject: [PATCH 2/2] Better invite link regex pattern --- pyrogram/client/ext/base_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/client/ext/base_client.py b/pyrogram/client/ext/base_client.py index 9c0fb26b..578cf168 100644 --- a/pyrogram/client/ext/base_client.py +++ b/pyrogram/client/ext/base_client.py @@ -26,7 +26,7 @@ from ...session.internals import MsgId class BaseClient: - INVITE_LINK_RE = re.compile(r"^(?:https?://)?(?:t\.me/joinchat/)([\w-]+)$") + INVITE_LINK_RE = re.compile(r"^(?:https?://)?(?:www\.)?(?:t(?:elegram)?\.(?:org|me|dog)/joinchat/)([\w-]+)$") BOT_TOKEN_RE = re.compile(r"^\d+:[\w-]+$") DIALOGS_AT_ONCE = 100 UPDATES_WORKERS = 1