1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-23 17:02:25 +03:00

Fix checkSessionsMembershipData thinking foci_preferred is required

This commit is contained in:
Robin
2025-08-27 15:30:36 +02:00
parent 6156d4ce10
commit b61e39a814

View File

@@ -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");