From 354eee056f1990609024fe2def2f5fa25e5ba1fb Mon Sep 17 00:00:00 2001 From: thedragonsinn <98635854+thedragonsinn@users.noreply.github.com> Date: Fri, 3 Nov 2023 18:32:06 +0530 Subject: [PATCH] get_message bug fix. --- app/plugins/tools/reply.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/plugins/tools/reply.py b/app/plugins/tools/reply.py index 659d6d8..a5755ca 100644 --- a/app/plugins/tools/reply.py +++ b/app/plugins/tools/reply.py @@ -5,9 +5,9 @@ from app.core import Message def get_message(link: str) -> tuple[int | str, int]: - parsed_url: str = urlparse(link).path.lstrip("/") - chat, id = parsed_url.split("/") - if chat.is_digit(): + parsed_url: str = urlparse(link).path.strip("/") + chat, id = parsed_url.lstrip("c/").split("/") + if chat.isdigit(): chat = int(f"-100{chat}") return chat, int(id)