diff --git a/README.md b/README.md index f0c0f6f..c99640d 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ This has always been the future intention of this project. ## TODO +- Change `socketsBySocketID` to `socketsByUUID` - Channel data saving - Permission groups and permissions - Probable permission groups: owner, admin, mod, trialmod, default diff --git a/src/channel/Channel.ts b/src/channel/Channel.ts index 045a18b..d979a05 100644 --- a/src/channel/Channel.ts +++ b/src/channel/Channel.ts @@ -842,15 +842,17 @@ export class Channel extends EventEmitter { let sentSocketIDs = new Array(); for (const p of this.ppl) { - socketLoop: for (const socket of socketsBySocketID.values()) { - if (socket.isDestroyed()) continue socketLoop; - if (!socket.socketID) continue socketLoop; - if (socket.getParticipantID() != p.id) continue socketLoop; - if (socket.getParticipantID() == part.id) continue socketLoop; - if (sentSocketIDs.includes(socket.socketID)) - continue socketLoop; - socket.sendArray([clientMsg]); - sentSocketIDs.push(socket.socketID); + socketLoop: for (const sock of socketsBySocketID.values()) { + this.logger.debug(`Socket ${sock.getUUID()}`); + if (sock.isDestroyed()) continue socketLoop; + if (!sock.socketID) continue socketLoop; + if (sock.getUUID() == socket.getUUID()) continue socketLoop; + if (sock.getParticipantID() != p.id) continue socketLoop; + //if (socket.getParticipantID() == part.id) continue socketLoop; + if (sentSocketIDs.includes(sock.socketID)) continue socketLoop; + + sock.sendArray([clientMsg]); + sentSocketIDs.push(sock.socketID); } } }