From 972032a87406d73de8db4f12bc23be2c9dac3771 Mon Sep 17 00:00:00 2001 From: platinouss Date: Tue, 12 Dec 2023 16:34:48 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=B0=9C=ED=91=9C=EC=9E=90=EC=97=90?= =?UTF-8?q?=EA=B2=8C=20=EC=A7=88=EB=AC=B8=20=ED=95=B4=EA=B2=B0=20=EC=99=84?= =?UTF-8?q?=EB=A3=8C=20=EC=9A=94=EC=B2=AD=EC=9D=84=20=EB=B0=9B=EC=9C=BC?= =?UTF-8?q?=EB=A9=B4,=20=ED=95=B4=EB=8B=B9=20=EA=B0=95=EC=9D=98=EC=8B=A4?= =?UTF-8?q?=20=EC=A7=88=EB=AC=B8=20stream=EC=97=90=20ACK=20=EC=9A=94?= =?UTF-8?q?=EC=B2=AD=EC=9D=84=20=EB=B3=B4=EB=82=B8=EB=8B=A4.=20#271?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 해결된 질문의 id를 받으면, Redis에 존재하는 해당 강의실 질문 stream에 ACK 요청을 보낸다. --- mediaServer/src/RelayServer.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mediaServer/src/RelayServer.ts b/mediaServer/src/RelayServer.ts index daffdd9..d735f82 100644 --- a/mediaServer/src/RelayServer.ts +++ b/mediaServer/src/RelayServer.ts @@ -222,6 +222,14 @@ export class RelayServer { .emit('asked', new Message(data.type, question.content), { questionId: question.streamKey }); }); + socket.on('solved', async (data) => { + if (clientInfo.type !== ClientType.PRESENTER || clientInfo.roomId !== data.roomId) { + console.log('해당 강의실 발표자만 질문을 완료할 수 있습니다.'); + return; + } + await updateQuestionStatus(data.roomId, data.questionId); + }); + socket.on('response', (data) => { if (data.type === 'question') { updateQuestionStatus(data.roomId, data.questionId);