From 39144e97b3a5e381edab8de26a59ffbbe9cc8a2f Mon Sep 17 00:00:00 2001 From: Alois Date: Fri, 1 May 2026 00:35:37 +0200 Subject: [PATCH] (fix): incorrect parse in getRoomMetadata (qol): update todos --- packages/call/src/store.tsx | 9 ++++++--- packages/call/todo.md | 1 - todo.md | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/call/src/store.tsx b/packages/call/src/store.tsx index d0173fc..e808ed6 100644 --- a/packages/call/src/store.tsx +++ b/packages/call/src/store.tsx @@ -220,9 +220,12 @@ function requireRuntime(runtime: Runtime | null): Runtime { export function getRoomMetadata() { const roomMetadata = room.metadata; - return JSON.parse(roomMetadata || '{"admin": 0}').catch(() => ({ - admin: 0, - })) as { admin: number }; + try { + const data = JSON.parse(roomMetadata || '{"admin": 0}'); + return data as { admin: number }; + } catch { + return { admin: 0 }; + } } // Sync local participant flags and screen-share derived state for the active call UI. diff --git a/packages/call/todo.md b/packages/call/todo.md index d34ceff..12dbb6c 100644 --- a/packages/call/todo.md +++ b/packages/call/todo.md @@ -7,6 +7,5 @@ - Buttons - Preview image - Mobile -- Deaf status is not synced - Call invite popup - Sounds diff --git a/todo.md b/todo.md index 78460a9..e214fb1 100644 --- a/todo.md +++ b/todo.md @@ -2,3 +2,4 @@ - Add "Rename Conversations to Friends" option in settings - Handle live messages in notification context - Add files to message height calculation +- Mobile message box broken