Skip to content

Commit da35e1c

Browse files
committed
Populate extraPeople for FOSDEM JSON schedules
1 parent 0abd0fe commit da35e1c

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

src/__tests__/backends/json/__snapshots__/JsonScheduleBackend.test.ts.snap

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
exports[`JsonScheduleBackend can parse a FOSDEM JSON format: auditoriums 1`] = `
44
Map {
55
"5" => {
6+
"extraPeople": [
7+
{
8+
"email": "[email protected]",
9+
"id": "1",
10+
"matrix_id": "@conal:example.org",
11+
"name": "Conal Coordinator",
12+
"role": "coordinator",
13+
},
14+
],
615
"id": "5",
716
"isPhysical": true,
817
"kind": "auditorium",
@@ -47,6 +56,15 @@ Map {
4756
},
4857
},
4958
"6" => {
59+
"extraPeople": [
60+
{
61+
"email": "[email protected]",
62+
"id": "246",
63+
"matrix_id": "@chloe:example.org",
64+
"name": "Chloé Coordinator",
65+
"role": "coordinator",
66+
},
67+
],
5068
"id": "6",
5169
"isPhysical": true,
5270
"kind": "auditorium",
@@ -112,6 +130,15 @@ Map {
112130
},
113131
},
114132
"7" => {
133+
"extraPeople": [
134+
{
135+
"email": "[email protected]",
136+
"id": "0",
137+
"matrix_id": "@bert:example.org",
138+
"name": "Bert Boss",
139+
"role": "coordinator",
140+
},
141+
],
115142
"id": "7",
116143
"isPhysical": true,
117144
"kind": "auditorium",

src/backends/json/FosdemJsonScheduleLoader.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export class FosdemJsonScheduleLoader {
108108
}
109109

110110
private convertAuditorium(track: FOSDEMTrack): IAuditorium {
111+
const extraPeople: IPerson[] = track.managers.map(person => this.convertPerson(person));
111112
return {
112113
id: track.id.toString(),
113114
slug: track.slug,
@@ -117,6 +118,7 @@ export class FosdemJsonScheduleLoader {
117118
talks: new Map(),
118119
// Hardcoded: FOSDEM is always physical now.
119120
isPhysical: true,
121+
extraPeople,
120122
};
121123
}
122124
}

0 commit comments

Comments
 (0)