Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2684 from matrix-org/travis/fix-e2e-menu-item
Browse files Browse the repository at this point in the history
Only set e2e info callback if the event is encrypted
  • Loading branch information
turt2live authored Feb 25, 2019
2 parents 4d1872d + 20cd198 commit 8049d5c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/views/rooms/EventTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,14 +321,17 @@ 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,
left: x,
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});
},
Expand Down

0 comments on commit 8049d5c

Please sign in to comment.