diff --git a/src/components/views/messages/EditHistoryMessage.js b/src/components/views/messages/EditHistoryMessage.js
index 8069a8e290..9d1c4bd784 100644
--- a/src/components/views/messages/EditHistoryMessage.js
+++ b/src/components/views/messages/EditHistoryMessage.js
@@ -59,6 +59,15 @@ export default class EditHistoryMessage extends React.PureComponent {
}, 'mx_Dialog_confirmredact');
};
+ _onViewSourceClick = () => {
+ const ViewSource = sdk.getComponent('structures.ViewSource');
+ Modal.createTrackedDialog('View Event Source', '', ViewSource, {
+ roomId: this.props.mxEvent.getRoomId(),
+ eventId: this.props.mxEvent.getId(),
+ content: this.props.mxEvent.event,
+ }, 'mx_Dialog_viewsource');
+ };
+
pillifyLinks() {
// not present for redacted events
if (this.refs.content) {
@@ -84,12 +93,19 @@ export default class EditHistoryMessage extends React.PureComponent {
_renderActionBar() {
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
// hide the button when already redacted
- if (this.props.mxEvent.isRedacted()) {
- return null;
+ let redactButton;
+ if (!this.props.mxEvent.isRedacted()) {
+ redactButton = (