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

Commit ebf6ba8

Browse files
committed
explicitly set device known-ness
1 parent a2dd1fa commit ebf6ba8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/components/views/dialogs/UnknownDeviceDialog.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ module.exports = React.createClass({
2626
onFinished: React.PropTypes.func.isRequired,
2727
},
2828

29+
componentDidMount: function() {
30+
// Given we've now shown the user the unknown device, it is no longer
31+
// unknown to them. Therefore mark it as 'known'.
32+
Object.keys(this.props.devices).forEach(userId=>{
33+
Object.keys(this.props.devices[userId]).map(deviceId=>{
34+
MatrixClientPeg.get().setDeviceKnown(userId, deviceId, true);
35+
})
36+
});
37+
},
38+
2939
onKeyDown: function(e) {
3040
if (e.keyCode === 27) { // escape
3141
e.stopPropagation();

0 commit comments

Comments
 (0)