| 3 | import { userJwtClaims } from './auth'; |
| 4 | |
| 5 | export class User { |
| 6 | public socket: WebSocket; |
| 7 | public id: string; |
| 8 | public userId: string; |
| 9 | public name: string; |
| 10 | public isGuest?: boolean; |
| 11 | |
| 12 | constructor(socket: WebSocket, userJwtClaims: userJwtClaims) { |
| 13 | this.socket = socket; |
| 14 | this.userId = userJwtClaims.userId; |
| 15 | this.id = randomUUID(); |
| 16 | this.name = userJwtClaims.name; |
| 17 | this.isGuest = userJwtClaims.isGuest; |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | class SocketManager { |
| 22 | private static instance: SocketManager; |
nothing calls this directly
no outgoing calls
no test coverage detected