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

Commit

Permalink
Don't emit decrypted event for the banner (#12944)
Browse files Browse the repository at this point in the history
  • Loading branch information
florianduros authored Sep 2, 2024
1 parent ae15bbe commit 1ac533e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hooks/usePinnedEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 1ac533e

Please sign in to comment.