diff --git a/spec/unit/event-timeline-set.spec.ts b/spec/unit/event-timeline-set.spec.ts index a817127569c..e86840ec5b2 100644 --- a/spec/unit/event-timeline-set.spec.ts +++ b/spec/unit/event-timeline-set.spec.ts @@ -303,8 +303,13 @@ describe("EventTimelineSet", () => { messageEventIsDecryptionFailureSpy.mockReturnValue(true); replyEventIsDecryptionFailureSpy.mockReturnValue(true); - messageEvent.emit(MatrixEventEvent.Decrypted, messageEvent); - replyEvent.emit(MatrixEventEvent.Decrypted, replyEvent); + messageEvent.emit( + MatrixEventEvent.Decrypted, + messageEvent, + undefined, + messageEvent.getPushDetails(), + ); + replyEvent.emit(MatrixEventEvent.Decrypted, replyEvent, undefined, replyEvent.getPushDetails()); // simulate decryption messageEventIsDecryptionFailureSpy.mockReturnValue(false); @@ -313,8 +318,13 @@ describe("EventTimelineSet", () => { messageEventShouldAttemptDecryptionSpy.mockReturnValue(false); replyEventShouldAttemptDecryptionSpy.mockReturnValue(false); - messageEvent.emit(MatrixEventEvent.Decrypted, messageEvent); - replyEvent.emit(MatrixEventEvent.Decrypted, replyEvent); + messageEvent.emit( + MatrixEventEvent.Decrypted, + messageEvent, + undefined, + messageEvent.getPushDetails(), + ); + replyEvent.emit(MatrixEventEvent.Decrypted, replyEvent, undefined, replyEvent.getPushDetails()); }); itShouldReturnTheRelatedEvents(); diff --git a/spec/unit/room-state.spec.ts b/spec/unit/room-state.spec.ts index c8d249870d8..261c7b120e8 100644 --- a/spec/unit/room-state.spec.ts +++ b/spec/unit/room-state.spec.ts @@ -1037,7 +1037,12 @@ describe("RoomState", function () { // this event is a message after decryption decryptingRelatedEvent.event.type = EventType.RoomMessage; - decryptingRelatedEvent.emit(MatrixEventEvent.Decrypted, decryptingRelatedEvent); + decryptingRelatedEvent.emit( + MatrixEventEvent.Decrypted, + decryptingRelatedEvent, + undefined, + decryptingRelatedEvent.getPushDetails(), + ); expect(addLocationsSpy).not.toHaveBeenCalled(); }); diff --git a/spec/unit/room.spec.ts b/spec/unit/room.spec.ts index 5dee474459f..df57ea7355b 100644 --- a/spec/unit/room.spec.ts +++ b/spec/unit/room.spec.ts @@ -3428,13 +3428,13 @@ describe("Room", function () { expect(room.polls.get(pollStartEventId)).toBeUndefined(); // now emit a Decrypted event but keep the decryption failure - pollStartEvent.emit(MatrixEventEvent.Decrypted, pollStartEvent); + pollStartEvent.emit(MatrixEventEvent.Decrypted, pollStartEvent, undefined, pollStartEvent.getPushDetails()); // still do not expect a poll to show up for the room expect(room.polls.get(pollStartEventId)).toBeUndefined(); // clear decryption failure and emit a Decrypted event again isDecryptionFailureSpy.mockRestore(); - pollStartEvent.emit(MatrixEventEvent.Decrypted, pollStartEvent); + pollStartEvent.emit(MatrixEventEvent.Decrypted, pollStartEvent, undefined, pollStartEvent.getPushDetails()); // the poll should now show up in the room's polls const poll = room.polls.get(pollStartEventId);