mention fix

This commit is contained in:
Kseninia Mikhaylova 2024-05-28 10:42:06 +03:00
parent 4d98a2623e
commit 4d56da588e
1 changed files with 1 additions and 3 deletions

View File

@ -58,9 +58,7 @@ async def tg_intgr_get(request: Request):
comment = re.sub(r"\[USER=\d+\]|\[\/USER\]", "", data_json["result"]["POST_MESSAGE"])
comment += f'\nhttps://crm.svs-tech.pro/company/personal/user/{bx_id}/tasks/task/view/{task_id}/'
mentions = re.findall(rf"\[USER=({bx_id})\]", comment)
logger.info(comment)
logger.info(mentions)
mentions = re.findall(rf"\[USER=({bx_id})\]", data_json["result"]["POST_MESSAGE"])
for _ in mentions:
logger.info("https://api.telegram.org/bot{TOKEN}/sendMessage?chat_id={tg_id}&text={comment}")
requests.get(