Don't emit decrypted event for the banner (#12944)

dbkr/sss
Florian Duros 2024-09-02 17:45:25 +02:00 committed by GitHub
parent ae15bbe6e0
commit 1ac533e730
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -126,7 +126,7 @@ async function fetchPinnedEvent(room: Room, pinnedEventId: string, cli: MatrixCl
// Decrypt the event if it's encrypted // Decrypt the event if it's encrypted
// Can happen when the tab is refreshed and the pinned events card is opened directly // Can happen when the tab is refreshed and the pinned events card is opened directly
if (localEvent?.isEncrypted()) { 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 // 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 // Decrypt the event if it's encrypted
if (event.isEncrypted()) { if (event.isEncrypted()) {
await cli.decryptEventIfNeeded(event); await cli.decryptEventIfNeeded(event, { emit: false });
} }
// Handle poll events // Handle poll events