Skip to content

Commit

Permalink
Make schedule view command show tasks even for physical talks (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
reivilibre authored Feb 1, 2024
1 parent d1e8b57 commit fa880ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commands/ScheduleCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ export class ScheduleCommand implements ICommand {
const upcoming = sortTasks(this.scheduler.inspect());
let html = "Upcoming tasks:<ul>";
for (const task of upcoming) {
const talkRoom = this.conference.getTalk(task.talk.id);
if (!talkRoom) continue;
const hasTalkRoom = this.conference.getTalk(task.talk.id) !== null;
const taskStart = moment(getStartTime(task));
const formattedTimestamp = taskStart.format("YYYY-MM-DD HH:mm:ss [UTC]ZZ");

Expand All @@ -45,7 +44,8 @@ export class ScheduleCommand implements ICommand {
html = "…<ul>";
}

html += `<li>${formattedTimestamp}: <b>${task.type} on ${await talkRoom.getName()}</b> (<code>${task.id}</code>) ${taskStart.fromNow()}</li>`;
const hasRoomIndicator = hasTalkRoom ? '(has talk room)' : '(no talk room)';
html += `<li>${formattedTimestamp}: <b>${task.type} on ${task.talk.title} ${hasRoomIndicator}</b> (<code>${task.id}</code>) ${taskStart.fromNow()}</li>`;
}
html += "</ul>";
await this.client.sendHtmlNotice(roomId, html);
Expand Down

0 comments on commit fa880ec

Please sign in to comment.