Skip to content

Commit

Permalink
Merge pull request #264 from platinouss/fix/231212-whiteboard-init
Browse files Browse the repository at this point in the history
Fix(#262): ๋ฐœํ‘œ์ž ์—ฐ๊ฒฐ ์ˆ˜๋ฆฝ ๊ณผ์ •์—์„œ ํ™”์ดํŠธ๋ณด๋“œ ์ดˆ๊ธฐ ๋ฐ์ดํ„ฐ ๋ฐ›์„ ์ˆ˜ ์žˆ๋„๋ก ๊ตฌ์„ฑ
  • Loading branch information
tmddus2 authored Dec 12, 2023
2 parents 197d1a9 + eeba8f2 commit 02dbb5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mediaServer/src/RelayServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class RelayServer {
socket.join(email);
await Promise.all([
saveClientInfo(email, ClientType.PRESENTER, data.roomId),
saveRoomInfo(data.roomId, new RoomInfoDto(email))
saveRoomInfo(data.roomId, new RoomInfoDto(email, data.whiteboard))
]);
if (roomInfo.presenterEmail !== email) {
if (await isQuestionStreamExisted(data.roomId)) {
Expand Down
6 changes: 3 additions & 3 deletions mediaServer/src/dto/room-info.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { ICanvasData } from '../types/canvas-data.interface';
export class RoomInfoDto {
presenterEmail: string;
startTime: Date;
currentWhiteboardData: ICanvasData | null;
currentWhiteboardData: string;

constructor(presenterEmail: string) {
constructor(presenterEmail: string, whiteboardData: ICanvasData) {
this.presenterEmail = presenterEmail;
this.startTime = new Date();
this.currentWhiteboardData = null;
this.currentWhiteboardData = JSON.stringify(whiteboardData);
}
}

0 comments on commit 02dbb5d

Please sign in to comment.