diff --git a/src/client.ts b/src/client.ts index 4c483d6e5..38ea2b982 100644 --- a/src/client.ts +++ b/src/client.ts @@ -6015,7 +6015,9 @@ export class MatrixClient extends EventEmitter { if (fetchedEventType === EventType.RoomMessageEncrypted) { const allEvents = originalEvent ? events.concat(originalEvent) : events; await Promise.all(allEvents.map(e => { - return new Promise(resolve => e.once("Event.decrypted", resolve)); + if (e.isEncrypted()) { + return new Promise(resolve => e.once("Event.decrypted", resolve)); + } })); events = events.filter(e => e.getType() === eventType); }