Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix null !== undefined mistake in #220 and improve rendering slightly #222

Merged
merged 2 commits into from
Feb 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading