Browse Source

Removing unused messages

develop
David Négrier 6 months ago
parent
commit
6bd9a998f9
  1. 5
      back/src/RoomManager.ts
  2. 9
      back/src/Services/SocketManager.ts
  3. 18
      front/src/Connexion/RoomConnection.ts
  4. 4
      messages/protos/messages.proto

5
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,

9
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<string, PromiseLike<GameRoom>> {
return this.roomsPromises;
}

18
front/src/Connexion/RoomConnection.ts

@ -91,12 +91,6 @@ export class RoomConnection implements RoomConnection {
private readonly _webRtcDisconnectMessageStream = new Subject<WebRtcDisconnectMessageTsProto>();
public readonly webRtcDisconnectMessageStream = this._webRtcDisconnectMessageStream.asObservable();
private readonly _playGlobalMessageStream = new Subject<PlayGlobalMessageTsProto>();
public readonly playGlobalMessageStream = this._playGlobalMessageStream.asObservable();
private readonly _stopGlobalMessageStream = new Subject<StopGlobalMessageTsProto>();
public readonly stopGlobalMessageStream = this._stopGlobalMessageStream.asObservable();
private readonly _teleportMessageMessageStream = new Subject<string>();
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);

4
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;

Loading…
Cancel
Save