MCPcopy Create free account
hub / github.com/code100x/chess / addUser

Method addUser

apps/ws/src/SocketManager.ts:40–46  ·  view source on GitHub ↗
(user: User, roomId: string)

Source from the content-addressed store, hash-verified

38 }
39
40 addUser(user: User, roomId: string) {
41 this.interestedSockets.set(roomId, [
42 ...(this.interestedSockets.get(roomId) || []),
43 user,
44 ]);
45 this.userRoomMappping.set(user.userId, roomId);
46 }
47
48 broadcast(roomId: string, message: string) {
49 const users = this.interestedSockets.get(roomId);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected