Skip to content

Commit

Permalink
Update auditorium names to be the track name on talk start
Browse files Browse the repository at this point in the history
  • Loading branch information
reivilibre committed Feb 4, 2024
1 parent 412d064 commit c5e8d08
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,16 @@ export class Scheduler {
(task.talk.qa_startTime !== null ? `<p>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.</p>` : ''),
);

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) {
Expand Down

0 comments on commit c5e8d08

Please sign in to comment.