From d4a36f5081e0704bd565463745e778bb203d8d6e Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sat, 19 Mar 2016 23:26:04 +0000 Subject: [PATCH] permalink button --- src/components/views/rooms/MessageContextMenu.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/components/views/rooms/MessageContextMenu.js b/src/components/views/rooms/MessageContextMenu.js index a4631dfa6b..a0a3f1cfd1 100644 --- a/src/components/views/rooms/MessageContextMenu.js +++ b/src/components/views/rooms/MessageContextMenu.js @@ -62,12 +62,17 @@ module.exports = React.createClass({ if (this.props.onFinished) this.props.onFinished(); }, + onPermalinkClick: function() { + if (this.props.onFinished) this.props.onFinished(); + }, + render: function() { var eventStatus = this.props.mxEvent.status; var resendButton; var viewSourceButton; var redactButton; var cancelButton; + var permalinkButton; if (eventStatus === 'not_sent') { resendButton = ( @@ -99,12 +104,22 @@ module.exports = React.createClass({ ); + // XXX: this should be https://matrix.to. + // XXX: if we use room ID, we should also include a server where the event can be found (other than in the domain of the event ID) + permalinkButton = ( +
+ Permalink +
+ ); + return (
{resendButton} {redactButton} {cancelButton} {viewSourceButton} + {permalinkButton}
); }