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
Browse files Browse the repository at this point in the history
  • Loading branch information
florianduros committed Sep 2, 2024
1 parent ae15bbe commit e0dd8f7
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 e0dd8f7

Please sign in to comment.