From 48eee987dd20e63f8b247470d80b1ec785fedafa Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Tue, 18 Jun 2024 09:25:31 +0300 Subject: [PATCH] string --- app/main.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/app/main.py b/app/main.py index c062e4d..2903e08 100644 --- a/app/main.py +++ b/app/main.py @@ -56,12 +56,16 @@ async def tg_intgr_get(request: Request): data = requests.get(get_comment_hook) data_json = data.json() comment = f"\nhttps://crm.svs-tech.pro/company/personal/user/{bx_id}/tasks/task/view/{task_id}/" - comment += " ".join( - re.sub( - r"((\[)(.*?)(]))", - "", - re.sub('"', "", data_json["result"]["POST_MESSAGE"]).split(" ")[:100], - ) + comment += re.sub( + '"', + "", + " ".join( + re.sub( + r"((\[)(.*?)(]))", + "", + data_json["result"]["POST_MESSAGE"].split(" ")[:100], + ) + ), ) comment += f'\nот {data_json["result"]["AUTHOR_NAME"]}'