diff --git a/app/main.py b/app/main.py index 3e2e825..d54d35f 100644 --- a/app/main.py +++ b/app/main.py @@ -1,5 +1,6 @@ import requests import json +import re from urllib.parse import parse_qs from fastapi import FastAPI, Request from app.constants import * @@ -48,9 +49,11 @@ async def tg_intgr_get(request: Request): get_comment_hook = f"https://crm.svs-tech.pro/rest/38/7ufrqnfpncmt279p/task.commentitem.get.json?taskId={task_id}&ITEMID={item_id}" data = requests.get(get_comment_hook) - comment = data.json() - logger.info(comment["result"]) - + data_json = data.json() + comment = data_json["result"]["POST_MESSAGE"] + + mention = re.findall(r"\[USER=(\d*)\]", comment) + logger.info(mention) return {"status": "success"} except: