fix more private field accesses in tests

This commit is contained in:
Michael Telatynski 2021-06-17 15:23:29 +01:00
parent 2e73647a85
commit 017e0ba40f

View file

@ -30,9 +30,7 @@ function createFailedDecryptionEvent() {
const event = new MatrixEvent({
event_id: "event-id-" + Math.random().toString(16).slice(2),
});
event._setClearData(
event._badEncryptedMessage(":("),
);
event.setClearData(event.badEncryptedMessage(":("));
return event;
}
@ -67,7 +65,7 @@ describe('DecryptionFailureTracker', function() {
tracker.eventDecrypted(decryptedEvent, err);
// Indicate successful decryption: clear data can be anything where the msgtype is not m.bad.encrypted
decryptedEvent._setClearData({});
decryptedEvent.setClearData({});
tracker.eventDecrypted(decryptedEvent, null);
// Pretend "now" is Infinity