device verification: use a js-sdk event

We'll probably want to be able to bubble up device verifications from the
js-sdk at some point, so let's use a js-sdk event for this.
This commit is contained in:
Richard van der Hoff 2016-06-08 21:25:42 +01:00
parent 7ce49c752f
commit 85770feb31
3 changed files with 19 additions and 36 deletions

View file

@ -17,8 +17,6 @@ limitations under the License.
var React = require('react');
var MatrixClientPeg = require("../../../MatrixClientPeg");
var dis = require("../../../dispatcher");
module.exports = React.createClass({
displayName: 'MemberDeviceInfo',
propTypes: {
@ -29,14 +27,6 @@ module.exports = React.createClass({
onVerifyClick: function() {
MatrixClientPeg.get().setDeviceVerified(this.props.userId,
this.props.device.id);
dis.dispatch({
action: 'device_verified',
params: {
userId: this.props.userId,
deviceId: this.props.device.id,
},
});
},
render: function() {