mention start

This commit is contained in:
Kseninia Mikhaylova 2024-05-07 13:53:20 +03:00
parent 04444ce0fb
commit 8dff524a92
1 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,6 @@
import requests import requests
import json import json
import re
from urllib.parse import parse_qs from urllib.parse import parse_qs
from fastapi import FastAPI, Request from fastapi import FastAPI, Request
from app.constants import * 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}" 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) data = requests.get(get_comment_hook)
comment = data.json() data_json = data.json()
logger.info(comment["result"]) comment = data_json["result"]["POST_MESSAGE"]
mention = re.findall(r"\[USER=(\d*)\]", comment)
logger.info(mention)
return {"status": "success"} return {"status": "success"}
except: except: