From ad00abe9c0075b5193c19ac85db288d9d127c7bf Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 9 Jun 2016 19:07:01 +0100 Subject: [PATCH] Support for making devices unverified Because its useful for testing Requires support from js-sdk, and (ideally) css from vector-web --- .../views/rooms/MemberDeviceInfo.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/components/views/rooms/MemberDeviceInfo.js b/src/components/views/rooms/MemberDeviceInfo.js index da53c744b2..ebc2ab1c32 100644 --- a/src/components/views/rooms/MemberDeviceInfo.js +++ b/src/components/views/rooms/MemberDeviceInfo.js @@ -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 = (
); + button = ( +
+ Unverify +
+ ); } else { button = ( -
Verify