allow to clear replacement on redacted events
this is needed when cancelling sending anything related to an event, to not keep the event as edited when we cancel the edit before the redaction.
This commit is contained in:
+5
-1
@@ -869,7 +869,11 @@ utils.extend(module.exports.MatrixEvent.prototype, {
|
||||
* @param {MatrixEvent?} newEvent the event with the replacing content, if any.
|
||||
*/
|
||||
makeReplaced(newEvent) {
|
||||
if (this.isRedacted()) {
|
||||
// don't allow redacted events to be replaced.
|
||||
// if newEvent is null we allow to go through though,
|
||||
// as with local redaction, the replacing event might get
|
||||
// cancelled, which should be reflected on the target event.
|
||||
if (this.isRedacted() && newEvent) {
|
||||
return;
|
||||
}
|
||||
if (this._replacingEvent !== newEvent) {
|
||||
|
||||
Reference in New Issue
Block a user