From c5e8d08e7c3622f3bb6eb09684999036c19461d4 Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Sat, 3 Feb 2024 14:57:16 +0000 Subject: [PATCH] Update auditorium names to be the track name on talk start --- src/Scheduler.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Scheduler.ts b/src/Scheduler.ts index 4f82c01..496999e 100644 --- a/src/Scheduler.ts +++ b/src/Scheduler.ts @@ -379,6 +379,16 @@ export class Scheduler { (task.talk.qa_startTime !== null ? `

During the talk, you can ask questions here for the Q&A at the end. ` + `The questions with the most 👍 votes are most visible to the speaker.

` : ''), ); + + try { + const nameEventContent = await this.client.getRoomStateEvent(confAud.roomId, "m.room.name", ""); + if (task.talk.track != '' && task.talk.track != undefined && task.talk.track != nameEventContent["name"]) { + nameEventContent["name"] = task.talk.track; + await this.client.sendStateEvent(confAud.roomId, "m.room.name", "", nameEventContent); + } + } catch (e) { + LogService.error("Scheduler:talkStart", `Error when considering changing name of track room: ${e}`); + } } else if (task.type === ScheduledTaskType.TalkQA) { if (!task.talk.prerecorded) return; if (confTalk !== undefined) {