You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-28 05:03:59 +03:00
expand comment why need to preserve redaction local echo on remote echo
This commit is contained in:
@@ -788,8 +788,11 @@ utils.extend(module.exports.MatrixEvent.prototype, {
|
||||
const oldUnsigned = this.getUnsigned();
|
||||
const oldId = this.getId();
|
||||
this.event = event;
|
||||
// keep being redacted if
|
||||
// the event was redacted as a local echo
|
||||
// if this event was redacted before it was sent, it's locally marked as redacted.
|
||||
// At this point, we've received the remote echo for the event, but not yet for
|
||||
// the redaction that we are sending ourselves. Preserve the locally redacted
|
||||
// state by copying over redacted_because so we don't get a flash of
|
||||
// redacted, not-redacted, redacted as remote echos come in
|
||||
if (oldUnsigned.redacted_because) {
|
||||
if (!this.event.unsigned) {
|
||||
this.event.unsigned = {};
|
||||
|
||||
Reference in New Issue
Block a user