Merge pull request #315 from matrix-org/rav/unverify_device

Support for making devices unverified
This commit is contained in:
David Baker 2016-06-17 17:00:12 +01:00 committed by GitHub
commit 4f96bd1b01

View File

@ -25,8 +25,15 @@ module.exports = React.createClass({
},
onVerifyClick: function() {
MatrixClientPeg.get().setDeviceVerified(this.props.userId,
this.props.device.id);
MatrixClientPeg.get().setDeviceVerified(
this.props.userId, this.props.device.id, true
);
},
onUnverifyClick: function() {
MatrixClientPeg.get().setDeviceVerified(
this.props.userId, this.props.device.id, false
);
},
render: function() {
@ -35,9 +42,15 @@ module.exports = React.createClass({
indicator = (
<div className="mx_MemberDeviceInfo_verified">&#x2714;</div>
);
button = (
<div className="mx_MemberDeviceInfo_textButton mx_MemberDeviceInfo_unverify"
onClick={this.onUnverifyClick}>
Unverify
</div>
);
} else {
button = (
<div className="mx_MemberDeviceInfo_textButton"
<div className="mx_MemberDeviceInfo_textButton mx_MemberDeviceInfo_verify"
onClick={this.onVerifyClick}>
Verify
</div>