1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Merge pull request #973 from matrix-org/t3chguy/show_hidden_redactions_missing_redacts

Add redacts field to event.toJSON
This commit is contained in:
Michael Telatynski
2019-07-03 13:10:16 +01:00
committed by GitHub

View File

@@ -1004,6 +1004,11 @@ utils.extend(module.exports.MatrixEvent.prototype, {
room_id: this.getRoomId(), room_id: this.getRoomId(),
}; };
// if this is a redaction then attach the redacts key
if (this.isRedaction()) {
event.redacts = this.event.redacts;
}
if (!this.isEncrypted()) { if (!this.isEncrypted()) {
return event; return event;
} }