You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Fix all megolm error reported as unknown (#8916)
* Fix all megolm error reported as unknown * code review * bad paste in comment
This commit is contained in:
@ -22,13 +22,16 @@ class MockDecryptionError extends Error {
|
||||
constructor(code) {
|
||||
super();
|
||||
|
||||
this.errcode = code || 'MOCK_DECRYPTION_ERROR';
|
||||
this.code = code || 'MOCK_DECRYPTION_ERROR';
|
||||
}
|
||||
}
|
||||
|
||||
function createFailedDecryptionEvent() {
|
||||
const event = new MatrixEvent({
|
||||
event_id: "event-id-" + Math.random().toString(16).slice(2),
|
||||
content: {
|
||||
algorithm: "m.megolm.v1.aes-sha2",
|
||||
},
|
||||
});
|
||||
event.setClearData(event.badEncryptedMessage(":("));
|
||||
return event;
|
||||
|
Reference in New Issue
Block a user