Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quote using innerText #4773

Merged
merged 1 commit into from
Aug 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions src/components/views/context_menus/MessageContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,9 @@ module.exports = React.createClass({
},

onQuoteClick: function() {
console.log(this.props.mxEvent);
dis.dispatch({
action: 'quote',
event: this.props.mxEvent,
text: this.props.eventTileOps.getInnerText(),
});
this.closeMenu();
},
Expand All @@ -153,6 +152,7 @@ module.exports = React.createClass({
let unhidePreviewButton;
let permalinkButton;
let externalURLButton;
let quoteButton;

if (eventStatus === 'not_sent') {
resendButton = (
Expand Down Expand Up @@ -221,11 +221,13 @@ module.exports = React.createClass({
</div>
);

const quoteButton = (
<div className="mx_MessageContextMenu_field" onClick={this.onQuoteClick}>
{ _t('Quote') }
</div>
);
if (this.props.eventTileOps && this.props.eventTileOps.getInnerText) {
quoteButton = (
<div className="mx_MessageContextMenu_field" onClick={this.onQuoteClick}>
{ _t('Quote') }
</div>
);
}

// Bridges can provide a 'external_url' to link back to the source.
if( typeof(this.props.mxEvent.event.content.external_url) === "string") {
Expand Down