From a193e2958b96e0b260ba419216eaf4ea01a4c6ff Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Tue, 21 Jan 2025 14:55:44 +0000 Subject: [PATCH] Reimplement `findPeopleWithId` in an attempt to fix stored person overrides --- src/Conference.ts | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/Conference.ts b/src/Conference.ts index 86837da..b592156 100644 --- a/src/Conference.ts +++ b/src/Conference.ts @@ -875,10 +875,31 @@ export class Conference { } /** - * @deprecated This always returns `[]` and should be removed or fixed. + * Return a list of all people with the given person ID. + * + * TODO does not support interest rooms */ public async findPeopleWithId(personId: string): Promise { - return []; + let out: IPerson[] = []; + + for (let auditorium of Object.values(this.auditoriums)) { + let audDef = auditorium.getDefinition(); + for (let talk of audDef.talks.values()) { + for (let person of talk.speakers) { + if (person.id === personId) { + out.push(person); + } + } + } + + for (let person of audDef.extraPeople) { + if (person.id === personId) { + out.push(person); + } + } + } + + return out; } /**