From 46ea695fc120e5a3e6afd17dd44d7684d40f0afe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=BE=8A?= Date: Mon, 15 Jan 2024 17:29:47 +0800 Subject: [PATCH] chat websocket api support param token and x-api-key --- src/backend/langflow/api/v1/chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/langflow/api/v1/chat.py b/src/backend/langflow/api/v1/chat.py index 066a8d7ae..4c034016d 100644 --- a/src/backend/langflow/api/v1/chat.py +++ b/src/backend/langflow/api/v1/chat.py @@ -29,7 +29,7 @@ async def chat( await websocket.accept() if not user: await websocket.close(code=status.WS_1008_POLICY_VIOLATION, reason="Unauthorized") - if not user.is_active: + elif not user.is_active: await websocket.close(code=status.WS_1008_POLICY_VIOLATION, reason="Unauthorized") if client_id in chat_service.cache_service: