mirror of
https://github.com/jcreek/EstimationPoker.git
synced 2026-07-13 02:53:46 +00:00
feat(#25): Add ability to kick a user
This commit is contained in:
@@ -66,6 +66,15 @@ export class Room {
|
||||
return null;
|
||||
}
|
||||
|
||||
getWebSocketByUserId(userId: String): WebSocket | null {
|
||||
for (const [ws, u] of this.users) {
|
||||
if (u.userId === userId) {
|
||||
return ws;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
broadcast(message: any) {
|
||||
this.users.forEach((user, client) => {
|
||||
if (client.readyState === WebSocket.OPEN) {
|
||||
|
||||
Reference in New Issue
Block a user