From 490b4288c87cd54ee337c3284f3c8ba20e1a6cd3 Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Tue, 4 Feb 2025 20:02:24 -0600 Subject: [PATCH] Fix window.SignalDebug.getMessage functions Co-authored-by: Scott Nonnenberg --- 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: () =>