Skip to content

Commit

Permalink
Update auditorium names to be the track name on talk start (#230)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
reivilibre and Half-Shot authored Feb 23, 2024
1 parent 412d064 commit b91e633
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,18 @@ 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 {
if (task.talk.track != '' && task.talk.track != undefined) {
const nameEventContent = await this.client.getRoomStateEvent(confAud.roomId, "m.room.name", "");
if (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 b91e633

Please sign in to comment.