feat(#4): Add sound alert for a user who hasn't done an estimate when everyone else has

This commit is contained in:
Josh Creek
2023-07-13 20:45:01 +00:00
parent 9160ca6175
commit ae970b6275
4 changed files with 46 additions and 2 deletions
+9
View File
@@ -26,6 +26,15 @@ export class Room {
return this.users.get(ws);
}
getWebSocketByUser(user: User): WebSocket | null {
for (const [ws, u] of this.users) {
if (u === user) {
return ws;
}
}
return null;
}
broadcast(message: any) {
this.users.forEach((user, client) => {
if (client.readyState === WebSocket.OPEN) {