Skip to content

Commit b91e633

Browse files
Update auditorium names to be the track name on talk start (#230)
* Update auditorium names to be the track name on talk start * Update src/Scheduler.ts Co-authored-by: Will Hunt <[email protected]> * Test talk track is not empty before pulling state --------- Co-authored-by: Will Hunt <[email protected]>
1 parent 412d064 commit b91e633

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Scheduler.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,18 @@ export class Scheduler {
379379
(task.talk.qa_startTime !== null ? `<p>During the talk, you can ask questions here for the Q&A at the end. ` +
380380
`The questions with the most 👍 votes are most visible to the speaker.</p>` : ''),
381381
);
382+
383+
try {
384+
if (task.talk.track != '' && task.talk.track != undefined) {
385+
const nameEventContent = await this.client.getRoomStateEvent(confAud.roomId, "m.room.name", "");
386+
if (task.talk.track != nameEventContent["name"]) {
387+
nameEventContent["name"] = task.talk.track;
388+
await this.client.sendStateEvent(confAud.roomId, "m.room.name", "", nameEventContent);
389+
}
390+
}
391+
} catch (e) {
392+
LogService.error("Scheduler:talkStart", `Error when considering changing name of track room`, e);
393+
}
382394
} else if (task.type === ScheduledTaskType.TalkQA) {
383395
if (!task.talk.prerecorded) return;
384396
if (confTalk !== undefined) {

0 commit comments

Comments
 (0)