codeBOKER commited on
Commit
3c13977
·
verified ·
1 Parent(s): 800fd8a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -75,11 +75,15 @@ async def telegram_webhook(request: Request):
75
  print("1----------TELEGRAM_TOKEN:", TELEGRAM_TOKEN)
76
  print("2---------TELEGRAM_URL:", TELEGRAM_URL)
77
  # Send back to Telegram
78
- async with httpx.AsyncClient() as client:
79
- await client.post(TELEGRAM_URL, json={
 
 
 
80
  "chat_id": chat_id,
81
  "text": ai_answer
82
- })
 
83
 
84
  return {"status": "ok"}
85
 
 
75
  print("1----------TELEGRAM_TOKEN:", TELEGRAM_TOKEN)
76
  print("2---------TELEGRAM_URL:", TELEGRAM_URL)
77
  # Send back to Telegram
78
+ async with httpx.AsyncClient(verify=False) as client:
79
+ await client.post(
80
+ f"https://149.154.167.220/bot{TELEGRAM_TOKEN}/sendMessage",
81
+ headers={"Host": "api.telegram.org"},
82
+ json={
83
  "chat_id": chat_id,
84
  "text": ai_answer
85
+ }
86
+ )
87
 
88
  return {"status": "ok"}
89