Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit bc7a8f8

Browse files
committed
Handle redaction
Signed-off-by: Šimon Brandner <[email protected]>
1 parent 9455a6d commit bc7a8f8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/components/views/rooms/ReplyTile.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export default class ReplyTile extends React.PureComponent<IProps> {
4545

4646
componentDidMount() {
4747
this.props.mxEvent.on("Event.decrypted", this.onDecrypted);
48+
this.props.mxEvent.on("Event.beforeRedaction", this.onBeforeRedaction);
4849
}
4950

5051
componentWillUnmount() {
@@ -58,6 +59,11 @@ export default class ReplyTile extends React.PureComponent<IProps> {
5859
}
5960
};
6061

62+
private onBeforeRedaction = (): void => {
63+
// When the event gets redacted, update it, so that a different tile handler is used
64+
this.forceUpdate();
65+
};
66+
6167
private onClick = (e: React.MouseEvent): void => {
6268
// This allows the permalink to be opened in a new tab/window or copied as
6369
// matrix.to, but also for it to enable routing within Riot when clicked.

0 commit comments

Comments
 (0)