Spaces:
Running
Running
Chandima Prabhath
commited on
Commit
·
458794e
1
Parent(s):
1fbbc17
Add debug logging for received data in whatsapp_webhook function
Browse files
app.py
CHANGED
@@ -207,6 +207,7 @@ async def whatsapp_webhook(request: Request):
|
|
207 |
raise HTTPException(403, "Unauthorized")
|
208 |
|
209 |
data = await request.json()
|
|
|
210 |
chat_id = data.get("senderData", {}).get("chatId")
|
211 |
if chat_id != BotConfig.BOT_GROUP_CHAT or data.get("typeWebhook") != "incomingMessageReceived":
|
212 |
return {"success": True}
|
|
|
207 |
raise HTTPException(403, "Unauthorized")
|
208 |
|
209 |
data = await request.json()
|
210 |
+
logging.debug(f"Received data: {data}")
|
211 |
chat_id = data.get("senderData", {}).get("chatId")
|
212 |
if chat_id != BotConfig.BOT_GROUP_CHAT or data.get("typeWebhook") != "incomingMessageReceived":
|
213 |
return {"success": True}
|