From 75e5986528b0e874edd383e1832a2dc55929345a Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Fri, 27 Dec 2024 14:54:17 +0000 Subject: [PATCH] Add support for the `online_qa` field --- src/backends/json/FosdemJsonScheduleLoader.ts | 2 +- .../json/jsonschemas/FosdemJsonSchedule.schema.json | 6 +++++- src/backends/json/jsontypes/FosdemJsonSchedule.schema.d.ts | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/backends/json/FosdemJsonScheduleLoader.ts b/src/backends/json/FosdemJsonScheduleLoader.ts index b410e42..824076d 100644 --- a/src/backends/json/FosdemJsonScheduleLoader.ts +++ b/src/backends/json/FosdemJsonScheduleLoader.ts @@ -93,7 +93,7 @@ export class FosdemJsonScheduleLoader { // This is overall a messy concept, but the only thing that matters now is whether this is // null (Q&A disabled) or non-null (Q&A enabled, with reminder 5 minutes before the end of the talk slot). // TODO overhaul replace with a boolean instead...? - qa_startTime: 0, + qa_startTime: talk.track.online_qa ? 0 : null, // Since the talks are not pre-recorded, the livestream is considered ended when the event ends. livestream_endTime: endMoment.valueOf(), diff --git a/src/backends/json/jsonschemas/FosdemJsonSchedule.schema.json b/src/backends/json/jsonschemas/FosdemJsonSchedule.schema.json index 0cdecd1..c8478fc 100644 --- a/src/backends/json/jsonschemas/FosdemJsonSchedule.schema.json +++ b/src/backends/json/jsonschemas/FosdemJsonSchedule.schema.json @@ -94,9 +94,13 @@ "id": { "type": "number", "description": "The Track ID of the track that the talk is in" + }, + "online_qa": { + "type": "boolean", + "description": "Whether online question & answer support is enabled for this track." } }, - "required": ["id"] + "required": ["id", "online_qa"] }, "conference_room": { "type": "string", diff --git a/src/backends/json/jsontypes/FosdemJsonSchedule.schema.d.ts b/src/backends/json/jsontypes/FosdemJsonSchedule.schema.d.ts index f3e23bc..acf8056 100644 --- a/src/backends/json/jsontypes/FosdemJsonSchedule.schema.d.ts +++ b/src/backends/json/jsontypes/FosdemJsonSchedule.schema.d.ts @@ -42,6 +42,10 @@ export interface FOSDEMTalk { * The Track ID of the track that the talk is in */ id: number; + /** + * Whether online question & answer support is enabled for this track. + */ + online_qa: boolean; [k: string]: unknown; }; /**