Files
calendar/packages/features/get-cal-video-reference.ts
T
Udit TakkarandGitHub c458b297ae fix: backward compatibility for old cal rooms (#15609)
* fix: record icon for old rooms

* chore: change function name
2024-06-28 09:42:38 +01:00

14 lines
410 B
TypeScript

export type Reference = {
id: number;
uid: string;
type: string;
meetingUrl: string | null;
meetingPassword: string | null;
};
export const getCalVideoReference = (references: Reference[]) => {
const videoReferences = references.filter((reference) => reference.type.includes("_video"));
const latestVideoReference = videoReferences[videoReferences.length - 1];
return latestVideoReference;
};