Skip to content

Commit

Permalink
Fix null !== undefined mistake in #220 and improve rendering slightly (
Browse files Browse the repository at this point in the history
…#222)

* Fix null !== undefined mistake

* Move 'has room'/'no room' indicator to less important space
  • Loading branch information
reivilibre authored Feb 2, 2024
1 parent fa880ec commit 313f8d9
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,7 +33,7 @@ export class ScheduleCommand implements ICommand {
const upcoming = sortTasks(this.scheduler.inspect());
let html = "Upcoming tasks:<ul>";
for (const task of upcoming) {
const hasTalkRoom = this.conference.getTalk(task.talk.id) !== null;
const hasTalkRoom = this.conference.getTalk(task.talk.id) !== undefined;
const taskStart = moment(getStartTime(task));
const formattedTimestamp = taskStart.format("YYYY-MM-DD HH:mm:ss [UTC]ZZ");

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

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

0 comments on commit 313f8d9

Please sign in to comment.