mirror of
https://github.com/element-hq/element-web
synced 2024-11-25 18:55:58 +03:00
Only set e2e info callback if the event is encrypted
Fixes https://github.com/vector-im/riot-web/issues/8551
This commit is contained in:
parent
150c941340
commit
20cd198784
1 changed files with 4 additions and 1 deletions
|
@ -321,6 +321,9 @@ module.exports = withMatrixClient(React.createClass({
|
|||
|
||||
const {tile, replyThread} = this.refs;
|
||||
|
||||
let e2eInfoCallback = null;
|
||||
if (this.props.mxEvent.isEncrypted()) e2eInfoCallback = () => this.onCryptoClicked();
|
||||
|
||||
ContextualMenu.createMenu(MessageContextMenu, {
|
||||
chevronOffset: 10,
|
||||
mxEvent: this.props.mxEvent,
|
||||
|
@ -328,7 +331,7 @@ module.exports = withMatrixClient(React.createClass({
|
|||
top: y,
|
||||
eventTileOps: tile && tile.getEventTileOps ? tile.getEventTileOps() : undefined,
|
||||
collapseReplyThread: replyThread && replyThread.canCollapse() ? replyThread.collapse : undefined,
|
||||
e2eInfoCallback: () => this.onCryptoClicked(),
|
||||
e2eInfoCallback: e2eInfoCallback,
|
||||
onFinished: function() {
|
||||
self.setState({menu: false});
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue