From 6bd9a998f97b6ad1bc40b29b50fd52a4c2cebbcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Mon, 3 Jan 2022 16:16:32 +0100 Subject: [PATCH] Removing unused messages --- back/src/RoomManager.ts | 5 ----- back/src/Services/SocketManager.ts | 9 --------- front/src/Connexion/RoomConnection.ts | 18 ------------------ messages/protos/messages.proto | 4 ---- 4 files changed, 36 deletions(-) diff --git a/back/src/RoomManager.ts b/back/src/RoomManager.ts index 3bb425b7..d375fbd8 100644 --- a/back/src/RoomManager.ts +++ b/back/src/RoomManager.ts @@ -106,11 +106,6 @@ const roomManager: IRoomManagerServer = { user, message.getWebrtcscreensharingsignaltoservermessage() as WebRtcSignalToServerMessage ); - } else if (message.hasPlayglobalmessage()) { - socketManager.emitPlayGlobalMessage( - room, - message.getPlayglobalmessage() as PlayGlobalMessage - ); } else if (message.hasQueryjitsijwtmessage()) { socketManager.handleQueryJitsiJwtMessage( user, diff --git a/back/src/Services/SocketManager.ts b/back/src/Services/SocketManager.ts index c9da7c96..9233811b 100644 --- a/back/src/Services/SocketManager.ts +++ b/back/src/Services/SocketManager.ts @@ -531,15 +531,6 @@ export class SocketManager { } } - emitPlayGlobalMessage(room: GameRoom, playGlobalMessage: PlayGlobalMessage) { - const serverToClientMessage = new ServerToClientMessage(); - serverToClientMessage.setPlayglobalmessage(playGlobalMessage); - - for (const [id, user] of room.getUsers().entries()) { - user.socket.write(serverToClientMessage); - } - } - public getWorlds(): Map> { return this.roomsPromises; } diff --git a/front/src/Connexion/RoomConnection.ts b/front/src/Connexion/RoomConnection.ts index b7aa30ce..96c6dd23 100644 --- a/front/src/Connexion/RoomConnection.ts +++ b/front/src/Connexion/RoomConnection.ts @@ -91,12 +91,6 @@ export class RoomConnection implements RoomConnection { private readonly _webRtcDisconnectMessageStream = new Subject(); public readonly webRtcDisconnectMessageStream = this._webRtcDisconnectMessageStream.asObservable(); - private readonly _playGlobalMessageStream = new Subject(); - public readonly playGlobalMessageStream = this._playGlobalMessageStream.asObservable(); - - private readonly _stopGlobalMessageStream = new Subject(); - public readonly stopGlobalMessageStream = this._stopGlobalMessageStream.asObservable(); - private readonly _teleportMessageMessageStream = new Subject(); public readonly teleportMessageMessageStream = this._teleportMessageMessageStream.asObservable(); @@ -410,18 +404,6 @@ export class RoomConnection implements RoomConnection { this._webRtcDisconnectMessageStream.next(message.webRtcDisconnectMessage); break; } - case "playGlobalMessage": { - // FIXME: WHY IS THIS UNUSED? CAN WE REMOVE THIS??? - // FIXME: WHY IS THIS UNUSED? CAN WE REMOVE THIS??? - this._playGlobalMessageStream.next(message.playGlobalMessage); - break; - } - case "stopGlobalMessage": { - // FIXME: WHY IS THIS UNUSED? CAN WE REMOVE THIS??? - // FIXME: WHY IS THIS UNUSED? CAN WE REMOVE THIS??? - this._stopGlobalMessageStream.next(message.stopGlobalMessage); - break; - } case "teleportMessageMessage": { // FIXME: WHY IS THIS UNUSED? CAN WE REMOVE THIS??? this._teleportMessageMessageStream.next(message.teleportMessageMessage.map); diff --git a/messages/protos/messages.proto b/messages/protos/messages.proto index 3c05037a..8ac7bbf0 100644 --- a/messages/protos/messages.proto +++ b/messages/protos/messages.proto @@ -296,8 +296,6 @@ message ServerToClientMessage { WebRtcSignalToClientMessage webRtcSignalToClientMessage = 5; WebRtcSignalToClientMessage webRtcScreenSharingSignalToClientMessage = 6; WebRtcDisconnectMessage webRtcDisconnectMessage = 7; - PlayGlobalMessage playGlobalMessage = 8; - StopGlobalMessage stopGlobalMessage = 9; TeleportMessageMessage teleportMessageMessage = 10; SendJitsiJwtMessage sendJitsiJwtMessage = 11; SendUserMessage sendUserMessage = 12; @@ -390,8 +388,6 @@ message PusherToBackMessage { SetPlayerDetailsMessage setPlayerDetailsMessage = 5; WebRtcSignalToServerMessage webRtcSignalToServerMessage = 6; WebRtcSignalToServerMessage webRtcScreenSharingSignalToServerMessage = 7; - PlayGlobalMessage playGlobalMessage = 8; - StopGlobalMessage stopGlobalMessage = 9; ReportPlayerMessage reportPlayerMessage = 10; QueryJitsiJwtMessage queryJitsiJwtMessage = 11; SendUserMessage sendUserMessage = 12;