Skip to content

Commit

Permalink
Add support for the online_qa field
Browse files Browse the repository at this point in the history
  • Loading branch information
reivilibre committed Dec 27, 2024
1 parent dd48e31 commit 08f7814
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Map {
"id": "3",
"livestream_endTime": 1706778000000,
"prerecorded": false,
"qa_startTime": 0,
"qa_startTime": null,
"speakers": [
{
"email": "ioferrell@localhost",
Expand Down Expand Up @@ -131,7 +131,7 @@ Map {
"id": "3",
"livestream_endTime": 1706778000000,
"prerecorded": false,
"qa_startTime": 0,
"qa_startTime": null,
"speakers": [
{
"email": "ioferrell@localhost",
Expand Down
9 changes: 6 additions & 3 deletions src/__tests__/backends/json/fosdem_democon.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"track": {
"id": 5,
"slug": "open_cad_cam",
"name": "Open CAD/CAM devroom"
"name": "Open CAD/CAM devroom",
"online_qa": false
}
},
{
Expand Down Expand Up @@ -60,7 +61,8 @@
"track": {
"id": 6,
"slug": "selfhosting",
"name": "Self-Hosted Software devroom"
"name": "Self-Hosted Software devroom",
"online_qa": true
}
},
{
Expand Down Expand Up @@ -88,7 +90,8 @@
"track": {
"id": 6,
"slug": "selfhosting",
"name": "Self-Hosted Software devroom"
"name": "Self-Hosted Software devroom",
"online_qa": true
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion src/backends/json/FosdemJsonScheduleLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
6 changes: 5 additions & 1 deletion src/backends/json/jsonschemas/FosdemJsonSchedule.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions src/backends/json/jsontypes/FosdemJsonSchedule.schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
/**
Expand Down

0 comments on commit 08f7814

Please sign in to comment.