Don't show for anything that doesn't have a msgtype and body
otherwise the server will just reject it anyway Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
2eb715002f
commit
0a1ebc2487
|
@ -151,13 +151,17 @@ module.exports = React.createClass({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.mxEvent.getType() === 'm.room.message'
|
if (this.props.mxEvent.getType() === 'm.room.message') {
|
||||||
&& this.props.mxEvent.getContent().msgtype !== 'm.bad.encrypted') {
|
const content = this.props.mxEvent.getContent();
|
||||||
forwardButton = (
|
if (content.msgtype // truthy check msgtype
|
||||||
<div className="mx_MessageContextMenu_field" onClick={this.onForwardClick}>
|
&& content.msgtype !== 'm.bad.encrypted'
|
||||||
Forward Message
|
&& content.hasOwnProperty('body')) {
|
||||||
</div>
|
forwardButton = (
|
||||||
);
|
<div className="mx_MessageContextMenu_field" onClick={this.onForwardClick}>
|
||||||
|
Forward Message
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
viewSourceButton = (
|
viewSourceButton = (
|
||||||
|
|
Loading…
Reference in New Issue