diff --git a/src/domain/session/room/timeline/tiles/RedactedTile.js b/src/domain/session/room/timeline/tiles/RedactedTile.js index 0026859d..c0da3c92 100644 --- a/src/domain/session/room/timeline/tiles/RedactedTile.js +++ b/src/domain/session/room/timeline/tiles/RedactedTile.js @@ -24,7 +24,11 @@ export class RedactedTile extends BaseMessageTile { get description() { const {redactionReason} = this._entry; if (this.isRedacting) { - return this.i18n`This message is being deleted …`; + if (redactionReason) { + return this.i18n`This message is being deleted (${redactionReason})…`; + } else { + return this.i18n`This message is being deleted…`; + } } else { if (redactionReason) { return this.i18n`This message has been deleted (${redactionReason}).`; diff --git a/src/matrix/room/timeline/entries/BaseEventEntry.js b/src/matrix/room/timeline/entries/BaseEventEntry.js index e474deb4..4bf09ed5 100644 --- a/src/matrix/room/timeline/entries/BaseEventEntry.js +++ b/src/matrix/room/timeline/entries/BaseEventEntry.js @@ -31,6 +31,13 @@ export class BaseEventEntry extends BaseEntry { return this.isRedacting; } + get redactionReason() { + if (this._pendingRedactions) { + return this._pendingRedactions[0].content?.reason; + } + return null; + } + /** aggregates local relation. @return [string] returns the name of the field that has changed, if any diff --git a/src/matrix/room/timeline/entries/EventEntry.js b/src/matrix/room/timeline/entries/EventEntry.js index d3287799..4dbb352f 100644 --- a/src/matrix/room/timeline/entries/EventEntry.js +++ b/src/matrix/room/timeline/entries/EventEntry.js @@ -122,6 +122,6 @@ export class EventEntry extends BaseEventEntry { if (redactionEvent) { return redactionEvent.content?.reason; } - return null; + return super.redactionReason; } } \ No newline at end of file