Files
chad/server/utils/socket-to-client.ts
opti1337 7ed23df3e9
All checks were successful
Deploy / deploy (push) Successful in 39s
refactor
2025-12-26 01:08:44 +06:00

13 lines
365 B
TypeScript

import type { ChadClient, SomeSocket } from '../types/webrtc.ts'
export function socketToClient(socket: SomeSocket): ChadClient {
return {
socketId: socket.id,
userId: socket.data.userId,
username: socket.data.username,
displayName: socket.data.displayName,
inputMuted: socket.data.inputMuted,
outputMuted: socket.data.outputMuted,
}
}