From 828431df707754f9013d6f5faadbe1b2905859a0 Mon Sep 17 00:00:00 2001 From: Seongyun Lee <79950005+seongyunlee@users.noreply.github.com> Date: Wed, 11 Oct 2023 18:41:30 +0900 Subject: [PATCH] fix/ finish tutoring (#90) --- src/tutoring/tutoring.service.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/tutoring/tutoring.service.ts b/src/tutoring/tutoring.service.ts index 7120d13..d7bc1a6 100644 --- a/src/tutoring/tutoring.service.ts +++ b/src/tutoring/tutoring.service.ts @@ -227,13 +227,15 @@ export class TutoringService { teacherId, ); - await this.socketRepository.sendMessageToBothUser( - tutoring.teacherId, - tutoring.studentId, - chatRoomId, - 'text', - JSON.stringify(startMessage), - ); + if (tutoring.status == 'reserved') { + await this.socketRepository.sendMessageToBothUser( + tutoring.teacherId, + tutoring.studentId, + chatRoomId, + 'text', + JSON.stringify(startMessage), + ); + } return await this.classroomInfo(tutoring.id, teacherId); } catch (error) {