diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index ad7b340c..7786b9bd 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -74,7 +74,7 @@ module.exports = React.createClass({ if (this.props.onFinished) this.props.onFinished(); }, - onPermalinkClick: function() { + closeMenu: function() { if (this.props.onFinished) this.props.onFinished(); }, @@ -101,6 +101,7 @@ module.exports = React.createClass({ var cancelButton; var permalinkButton; var unhidePreviewButton; + var externalURLButton; if (eventStatus === 'not_sent') { resendButton = ( @@ -146,7 +147,7 @@ module.exports = React.createClass({ permalinkButton = (
Permalink + target="_blank" rel="noopener" onClick={ this.closeMenu }>Permalink
); @@ -156,6 +157,17 @@ module.exports = React.createClass({ ); + // Bridges can provide a 'external_url' to link back to the source. + if( typeof(this.props.mxEvent.event.content.external_url) === "string") { + externalURLButton = ( +
+ Source URL +
+ ); + } + + return (
{resendButton} @@ -165,6 +177,7 @@ module.exports = React.createClass({ {unhidePreviewButton} {permalinkButton} {UserSettingsStore.isFeatureEnabled('rich_text_editor') ? quoteButton : null} + {externalURLButton}
); }