clean up ws

This commit is contained in:
Philipinho
2026-03-26 13:59:17 +00:00
parent 0e4a1e7419
commit 53608eae35
3 changed files with 12 additions and 3 deletions
+9
View File
@@ -27,6 +27,15 @@ export class WsService {
async handleTreeEvent(client: Socket, data: any): Promise<void> {
const room = getSpaceRoomName(data.spaceId);
if (!client.rooms.has(room)) {
return;
}
if (data.operation === 'refetchRootTreeNodeEvent') {
client.broadcast.to(room).emit('message', data);
return;
}
const hasRestrictions = await this.spaceHasRestrictions(data.spaceId);
if (!hasRestrictions) {
client.broadcast.to(room).emit('message', data);