Изменение вебсокета

This commit is contained in:
urec56 2024-06-05 17:05:45 +05:00
parent e2c39a66ff
commit 1988800e7b

View file

@ -136,8 +136,8 @@ async def websocket_endpoint(
# user: SUser = Depends(get_current_user_ws), # user: SUser = Depends(get_current_user_ws),
uow=Depends(UnitOfWork) uow=Depends(UnitOfWork)
): ):
await AuthService.check_verificated_user_with_exc(uow=uow, user_id=user.id) # 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 AuthService.validate_user_access_to_chat(uow=uow, user_id=user.id, chat_id=chat_id)
await manager.connect(chat_id, websocket) await manager.connect(chat_id, websocket)
await websocket.send_json({"scope": str(websocket.scope), "cookies": str(websocket.cookies), "headers": str(websocket.headers)}) await websocket.send_json({"scope": str(websocket.scope), "cookies": str(websocket.cookies), "headers": str(websocket.headers)})
try: try: