WIP - use dynamic client using the user id

This commit is contained in:
Francisco Gaona
2026-01-04 00:04:47 +01:00
parent 6a30a99c62
commit 71cd6a07b7
2 changed files with 41 additions and 10 deletions

View File

@@ -290,4 +290,20 @@ export class VoiceGateway
socket.emit('ai:action', data);
}
}
/**
* Get connected users for a tenant
*/
getConnectedUsers(tenantDomain?: string): string[] {
const userIds: string[] = [];
for (const [userId, socket] of this.connectedUsers.entries()) {
// If tenantDomain specified, filter by tenant
if (!tenantDomain || socket.tenantSlug === tenantDomain) {
userIds.push(userId);
}
}
return userIds;
}
}