mirror of
https://github.com/open-webui/computer.git
synced 2026-12-02 01:42:55 -05:00
refac
This commit is contained in:
1 parent
acd4285dc9
commit
33cc710d10
2 files changed
+5
-2
No files matched your search
@@ -281,9 +281,12 @@ async def whatsapp_webhook_verify(bot_id: str, request: Request):
|
||||
@webhook_router.post("/whatsapp/{bot_id}")
|
||||
async def whatsapp_webhook_inbound(bot_id: str, request: Request):
|
||||
"""Receive inbound WhatsApp messages via webhook."""
|
||||
from cptr.utils.bridge import bot_manager
|
||||
payload = await request.json()
|
||||
|
||||
bot_manager = getattr(request.app.state, "bot_manager", None)
|
||||
if not bot_manager:
|
||||
raise HTTPException(503, "Bot manager not initialized")
|
||||
|
||||
adapter = bot_manager._adapters.get(bot_id)
|
||||
if adapter:
|
||||
from cptr.utils.adapters.whatsapp import WhatsAppAdapter
|
||||
|
||||
Reference in new issue
Block a user