From 1ac533e7306a49212cec2d21cb7c82c38e6f202c Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Mon, 2 Sep 2024 17:45:25 +0200 Subject: [PATCH] Don't emit decrypted event for the banner (#12944) --- src/hooks/usePinnedEvents.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/usePinnedEvents.ts b/src/hooks/usePinnedEvents.ts index eb531511385..bd073362198 100644 --- a/src/hooks/usePinnedEvents.ts +++ b/src/hooks/usePinnedEvents.ts @@ -126,7 +126,7 @@ async function fetchPinnedEvent(room: Room, pinnedEventId: string, cli: MatrixCl // Decrypt the event if it's encrypted // Can happen when the tab is refreshed and the pinned events card is opened directly if (localEvent?.isEncrypted()) { - await cli.decryptEventIfNeeded(localEvent); + await cli.decryptEventIfNeeded(localEvent, { emit: false }); } // If the event is available locally, return it if it's pinnable @@ -150,7 +150,7 @@ async function fetchPinnedEvent(room: Room, pinnedEventId: string, cli: MatrixCl // Decrypt the event if it's encrypted if (event.isEncrypted()) { - await cli.decryptEventIfNeeded(event); + await cli.decryptEventIfNeeded(event, { emit: false }); } // Handle poll events