1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-07-30 04:23:07 +03:00

Ensure we don't overinflate the total notification count (#3634)

* Ensure we don't overinflate the total notification count

By correctly comparing push rules before & after decryption

* DRY the code

* Testsssss

* Update tests
This commit is contained in:
Michael Telatynski
2023-07-28 16:05:11 +01:00
committed by GitHub
parent 615f7f9e72
commit fd0c4a7f56
6 changed files with 80 additions and 57 deletions

View File

@ -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();
});