From 74acb3a2dd7eddb8657b33321ec48dc8f1fb7308 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Tue, 4 Feb 2025 07:08:47 +1000 Subject: [PATCH] Fix window.SignalDebug.getMessage functions (#9699) --- ts/windows/main/start.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ts/windows/main/start.ts b/ts/windows/main/start.ts index 856bb65153..fb8ef74d4c 100644 --- a/ts/windows/main/start.ts +++ b/ts/windows/main/start.ts @@ -66,9 +66,14 @@ if ( )?.attributes; }, getConversation: (id: string) => window.ConversationController.get(id), - getMessageById: (id: string) => window.MessageCache.getById(id), - getMessageBySentAt: (timestamp: number) => - window.MessageCache.findBySentAt(timestamp, () => true), + getMessageById: (id: string) => window.MessageCache.getById(id)?.attributes, + getMessageBySentAt: async (timestamp: number) => { + const message = await window.MessageCache.findBySentAt( + timestamp, + () => true + ); + return message?.attributes; + }, getReduxState: () => window.reduxStore.getState(), getSfuUrl: () => window.Signal.Services.calling._sfuUrl, getIceServerOverride: () =>