(websocket: WebSocket)
| 104 | |
| 105 | @requires(class="st">"authenticated") |
| 106 | async def websocket_endpoint(websocket: WebSocket) -> None: |
| 107 | await websocket.accept() |
| 108 | await websocket.send_json( |
| 109 | { |
| 110 | class="st">"authenticated": websocket.user.is_authenticated, |
| 111 | class="st">"user": websocket.user.display_name, |
| 112 | } |
| 113 | ) |
| 114 | |
| 115 | |
| 116 | def async_inject_decorator( |