diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js
index ffa2a0bf5c..17de6f462a 100644
--- a/src/components/views/context_menus/MessageContextMenu.js
+++ b/src/components/views/context_menus/MessageContextMenu.js
@@ -211,7 +211,8 @@ module.exports = React.createClass({
},
render: function() {
- const eventStatus = this.props.mxEvent.status;
+ const mxEvent = this.props.mxEvent;
+ const eventStatus = mxEvent.status;
let resendButton;
let redactButton;
let cancelButton;
@@ -251,8 +252,8 @@ module.exports = React.createClass({
);
}
- if (isSent && this.props.mxEvent.getType() === 'm.room.message') {
- const content = this.props.mxEvent.getContent();
+ if (isSent && mxEvent.getType() === 'm.room.message') {
+ const content = mxEvent.getContent();
if (content.msgtype && content.msgtype !== 'm.bad.encrypted' && content.hasOwnProperty('body')) {
forwardButton = (
@@ -282,7 +283,7 @@ module.exports = React.createClass({
);
- if (this.props.mxEvent.getType() !== this.props.mxEvent.getWireType()) {
+ if (mxEvent.getType() !== mxEvent.getWireType()) {
viewClearSourceButton = (
{ _t('View Decrypted Source') }
@@ -303,8 +304,11 @@ 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)
const permalinkButton = (
);
@@ -318,12 +322,12 @@ 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" &&
- isUrlPermitted(this.props.mxEvent.event.content.external_url)
+ typeof(mxEvent.event.content.external_url) === "string" &&
+ isUrlPermitted(mxEvent.event.content.external_url)
) {
externalURLButton = (
);
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 0bc7b55484..88e023484b 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -1203,6 +1203,7 @@
"View Decrypted Source": "View Decrypted Source",
"Unhide Preview": "Unhide Preview",
"Share Message": "Share Message",
+ "Share Permalink": "Share Permalink",
"Quote": "Quote",
"Source URL": "Source URL",
"Collapse Reply Thread": "Collapse Reply Thread",