Fix tls
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
dvirlabs 2026-04-03 12:09:36 +03:00
parent 9c7b477bd4
commit 45604b5797
2 changed files with 7 additions and 2 deletions

View File

@ -4,6 +4,7 @@ sqlalchemy>=2.0.23
psycopg2-binary>=2.9.9
pydantic[email]>=2.5.0
httpx>=0.25.2
certifi>=2024.0.0
python-dotenv>=1.0.0
python-multipart>=0.0.7
openpyxl>=3.1.2

View File

@ -3,7 +3,9 @@ WhatsApp Cloud API Service
Handles sending WhatsApp messages via Meta's API
"""
import os
import ssl
import httpx
import certifi
import re
import logging
from typing import Optional
@ -164,7 +166,8 @@ class WhatsAppService:
url = f"{self.base_url}/{self.phone_number_id}/messages"
try:
async with httpx.AsyncClient() as client:
ssl_ctx = ssl.create_default_context(cafile=certifi.where())
async with httpx.AsyncClient(verify=ssl_ctx) as client:
response = await client.post(
url,
json=payload,
@ -294,7 +297,8 @@ class WhatsAppService:
print("=" * 80 + "\n")
try:
async with httpx.AsyncClient() as client:
ssl_ctx = ssl.create_default_context(cafile=certifi.where())
async with httpx.AsyncClient(verify=ssl_ctx) as client:
response = await client.post(
url,
json=payload,