13 lines
365 B
TypeScript
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,
|
|
}
|
|
}
|