From 0ce28ac1924831187860a9c606338eaecb9bbb82 Mon Sep 17 00:00:00 2001 From: platinouss Date: Tue, 12 Dec 2023 12:02:03 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=83=88=EB=A1=9C=20=EB=B0=A9=EC=9D=84?= =?UTF-8?q?=20=EA=B0=9C=EC=84=A4=ED=96=88=EC=9D=84=20=EB=95=8C=EB=A7=8C,?= =?UTF-8?q?=20=EA=B0=95=EC=9D=98=20=EC=8B=9C=EC=9E=91=EC=8B=9C=EA=B0=84?= =?UTF-8?q?=EA=B3=BC=20=ED=99=94=EC=9D=B4=ED=8A=B8=EB=B3=B4=EB=93=9C=20?= =?UTF-8?q?=EC=B4=88=EA=B8=B0=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EB=B0=98?= =?UTF-8?q?=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mediaServer/src/RelayServer.ts | 8 ++++---- mediaServer/src/services/client.service.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mediaServer/src/RelayServer.ts b/mediaServer/src/RelayServer.ts index 7366e3a..805d314 100644 --- a/mediaServer/src/RelayServer.ts +++ b/mediaServer/src/RelayServer.ts @@ -64,15 +64,15 @@ export class RelayServer { this.clientsConnectionInfo.set(email, new ClientConnectionInfo(RTCPC)); this.roomsConnectionInfo.set(data.roomId, new RoomConnectionInfo(RTCPC)); socket.join(email); - await Promise.all([ - saveClientInfo(email, ClientType.PRESENTER, data.roomId), - saveRoomInfo(data.roomId, new RoomInfoDto(email, data.whiteboard)) - ]); if (roomInfo.presenterEmail !== email) { if (await isQuestionStreamExisted(data.roomId)) { await deleteQuestionStream(data.roomId); } await setQuestionStreamAndGroup(data.roomId); + await Promise.all([ + saveClientInfo(email, ClientType.PRESENTER, data.roomId), + saveRoomInfo(data.roomId, new RoomInfoDto(email, data.whiteboard)) + ]); } if (roomInfo.presenterEmail === email) { await sendDataToReconnectPresenter(email, data.roomId, roomInfo); diff --git a/mediaServer/src/services/client.service.ts b/mediaServer/src/services/client.service.ts index cb8b4ea..3776e02 100644 --- a/mediaServer/src/services/client.service.ts +++ b/mediaServer/src/services/client.service.ts @@ -17,7 +17,7 @@ const saveClientInfo = async (email: string, clientType: ClientType, roomId: str const sendDataToReconnectPresenter = async (email: string, roomId: string, roomInfo: Record) => { const unsolvedQuestions = (await findUnsolvedQuestions(roomId, email)) as StreamReadRaw; sendMessageUsingSocket('/create-room', email, 'reconnectPresenter', { - whiteboard: roomInfo.currentWhiteboardData, + whiteboard: JSON.parse(roomInfo.currentWhiteboardData), startTime: roomInfo.startTime, questions: unsolvedQuestions[0][1] });