You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
make sure redacted e2e messages are returned as a promise
Signed-off-by: Hubert Chathi <hubert@uhoreg.ca>
This commit is contained in:
@@ -770,13 +770,13 @@ Crypto.prototype.encryptEvent = function(event, room) {
|
|||||||
*/
|
*/
|
||||||
Crypto.prototype.decryptEvent = function(event) {
|
Crypto.prototype.decryptEvent = function(event) {
|
||||||
if (event.isRedacted()) {
|
if (event.isRedacted()) {
|
||||||
return {
|
return Promise.resolve({
|
||||||
clearEvent: {
|
clearEvent: {
|
||||||
room_id: event.getRoomId(),
|
room_id: event.getRoomId(),
|
||||||
type: "m.room.message",
|
type: "m.room.message",
|
||||||
content: {},
|
content: {},
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
const content = event.getWireContent();
|
const content = event.getWireContent();
|
||||||
const alg = this._getRoomDecryptor(event.getRoomId(), content.algorithm);
|
const alg = this._getRoomDecryptor(event.getRoomId(), content.algorithm);
|
||||||
|
|||||||
Reference in New Issue
Block a user