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

This commit is contained in:
dvirlabs 2026-05-13 10:52:30 +03:00
parent e4fb9cf62f
commit d9cdddb8c8

View File

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