Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(#271): 질문 id와 solved 요청을 받으면, 해당 질문에 ACK 요청을 보낸다. #273

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions mediaServer/src/RelayServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down