From b61e39a81458fb02d76d384e9c4bbef30fcd516a Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 27 Aug 2025 15:30:36 +0200 Subject: [PATCH] Fix checkSessionsMembershipData thinking foci_preferred is required --- src/matrixrtc/CallMembership.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrixrtc/CallMembership.ts b/src/matrixrtc/CallMembership.ts index 8bd894045..b34644525 100644 --- a/src/matrixrtc/CallMembership.ts +++ b/src/matrixrtc/CallMembership.ts @@ -93,7 +93,7 @@ const checkSessionsMembershipData = (data: any, errors: string[]): data is Sessi if (typeof data.call_id !== "string") errors.push(prefix + "call_id must be string"); if (typeof data.application !== "string") errors.push(prefix + "application must be a string"); if (typeof data.focus_active?.type !== "string") errors.push(prefix + "focus_active.type must be a string"); - if (!Array.isArray(data.foci_preferred)) errors.push(prefix + "foci_preferred must be an array"); + if (data.foci_preferred !== undefined && !Array.isArray(data.foci_preferred)) errors.push(prefix + "foci_preferred must be an array"); // optional parameters if (data.created_ts && typeof data.created_ts !== "number") errors.push(prefix + "created_ts must be number");