From b8c77bfae7631e26d58b8bd4d852f8cee45e5498 Mon Sep 17 00:00:00 2001 From: urec56 Date: Wed, 5 Jun 2024 19:49:05 +0500 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=B2=D0=B5=D0=B1=D1=81=D0=BE=D0=BA=D0=B5=D1=82?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chat/websocket.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/chat/websocket.py b/app/chat/websocket.py index 97d5c0d..0dd4e07 100644 --- a/app/chat/websocket.py +++ b/app/chat/websocket.py @@ -136,15 +136,15 @@ manager = ConnectionManager() async def websocket_endpoint( chat_id: int, websocket: WebSocket, - authorization: Annotated[str | None, Header()] = None, + sec_websocket_protocol: Annotated[str | None, Header()] = None, # user: SUser = Depends(get_current_user_ws), uow=Depends(UnitOfWork) ): # await AuthService.check_verificated_user_with_exc(uow=uow, user_id=user.id) # await AuthService.validate_user_access_to_chat(uow=uow, user_id=user.id, chat_id=chat_id) await manager.connect(chat_id, websocket) - logging.critical(authorization) - await websocket.send_json({"headers": str(websocket.headers), "authorization": authorization}) + logging.critical(sec_websocket_protocol) + await websocket.send_json({"headers": str(websocket.headers), "authorization": sec_websocket_protocol}) try: while True: data = await websocket.receive_json()