diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index f2a10674..84bebc13 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -25,6 +25,7 @@ import { _t } from 'matrix-react-sdk/lib/languageHandler'; const Modal = require('matrix-react-sdk/lib/Modal'); const Resend = require("matrix-react-sdk/lib/Resend"); import SettingsStore from "matrix-react-sdk/lib/settings/SettingsStore"; +import {makeEventPermalink} from 'matrix-react-sdk/lib/matrix-to'; module.exports = React.createClass({ displayName: 'MessageContextMenu', @@ -170,17 +171,18 @@ module.exports = React.createClass({ }, onQuoteClick: function() { - if (SettingsStore.isFeatureEnabled("feature_rich_quoting")) { - dis.dispatch({ - action: 'quote_event', - event: this.props.mxEvent, - }); - } else { - dis.dispatch({ - action: 'quote', - text: this.props.eventTileOps.getInnerText(), - }); - } + dis.dispatch({ + action: 'quote', + text: this.props.eventTileOps.getInnerText(), + }); + this.closeMenu(); + }, + + onReplyClick: function() { + dis.dispatch({ + action: 'quote_event', + event: this.props.mxEvent, + }); this.closeMenu(); }, @@ -197,6 +199,7 @@ module.exports = React.createClass({ let permalinkButton; let externalURLButton; let quoteButton; + let replyButton; if (eventStatus === 'not_sent') { resendButton = ( @@ -268,8 +271,8 @@ module.exports = React.createClass({ // 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 = (
- { _t('Permalink') } + { _t('Permalink') }
); @@ -279,6 +282,14 @@ module.exports = React.createClass({ { _t('Quote') } ); + + if (SettingsStore.isFeatureEnabled("feature_rich_quoting")) { + replyButton = ( +
+ { _t('Reply') } +
+ ); + } } // Bridges can provide a 'external_url' to link back to the source. @@ -304,6 +315,7 @@ module.exports = React.createClass({ {unhidePreviewButton} {permalinkButton} {quoteButton} + {replyButton} {externalURLButton} ); diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index c1857e31..cdca2570 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -217,5 +217,6 @@ "Contributing code to Matrix and Riot": "Contributing code to Matrix and Riot", "Dev chat for the Riot/Web dev team": "Dev chat for the Riot/Web dev team", "Dev chat for the Dendrite dev team": "Dev chat for the Dendrite dev team", - "Co-ordination for Riot/Web translators": "Co-ordination for Riot/Web translators" + "Co-ordination for Riot/Web translators": "Co-ordination for Riot/Web translators", + "Reply": "Reply" }