Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 1ac533e

Browse files
authored
Don't emit decrypted event for the banner (#12944)
1 parent ae15bbe commit 1ac533e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hooks/usePinnedEvents.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ async function fetchPinnedEvent(room: Room, pinnedEventId: string, cli: MatrixCl
126126
// Decrypt the event if it's encrypted
127127
// Can happen when the tab is refreshed and the pinned events card is opened directly
128128
if (localEvent?.isEncrypted()) {
129-
await cli.decryptEventIfNeeded(localEvent);
129+
await cli.decryptEventIfNeeded(localEvent, { emit: false });
130130
}
131131

132132
// 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
150150

151151
// Decrypt the event if it's encrypted
152152
if (event.isEncrypted()) {
153-
await cli.decryptEventIfNeeded(event);
153+
await cli.decryptEventIfNeeded(event, { emit: false });
154154
}
155155

156156
// Handle poll events

0 commit comments

Comments
 (0)