(ws: WebSocket, token: string | null)
| 148 | } |
| 149 | |
| 150 | function sendHello(ws: WebSocket, token: string | null): void { |
| 151 | const sessionId = opts?.getSessionId() ?? undefined; |
| 152 | helloedSession = sessionId ?? null; |
| 153 | ws.send( |
| 154 | JSON.stringify({ |
| 155 | type: "hello", |
| 156 | token: token ?? "", |
| 157 | sessionId, |
| 158 | lastReceivedId: lastHandledId, |
| 159 | }), |
| 160 | ); |
| 161 | } |
| 162 | |
| 163 | async function handleSocketMessage(ws: WebSocket, raw: string): Promise<void> { |
| 164 | let msg: { type?: string; notification?: SocketNotification; error?: string }; |
no test coverage detected