From e01ac7a3d3feba5c2d3b03c37a9a1fc0f915c5b3 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sat, 20 Mar 2021 13:16:55 +0100 Subject: [PATCH] Revert changes to the invite link regex pattern New invite link methods don't need this and this change was breaking old code (get_chat, join_chat) --- pyrogram/scaffold.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyrogram/scaffold.py b/pyrogram/scaffold.py index 434c5bb4..a0033599 100644 --- a/pyrogram/scaffold.py +++ b/pyrogram/scaffold.py @@ -41,8 +41,7 @@ class Scaffold: PARENT_DIR = Path(sys.argv[0]).parent - # https://regex101.com/r/pme5ZE/2 Matches both the entire link and the hash itself - INVITE_LINK_RE = re.compile(r"^(?:(?:https?://)?(?:www\.)?(?:t(?:elegram)?\.(?:org|me|dog)/joinchat/))?(?P[\w-]+)$") + INVITE_LINK_RE = re.compile(r"^(?:https?://)?(?:www\.)?(?:t(?:elegram)?\.(?:org|me|dog)/joinchat/)([\w-]+)$") WORKERS = min(32, os.cpu_count() + 4) WORKDIR = PARENT_DIR CONFIG_FILE = PARENT_DIR / "config.ini"