Show a warning dialog when user indicates a new session wasn't them

This commit is contained in:
Zoe 2020-02-25 11:34:01 +00:00
parent 866fdd6185
commit 9ed83b8648
3 changed files with 30 additions and 1 deletions

View file

@ -42,6 +42,12 @@ export default class UnverifiedSessionToast extends React.PureComponent {
Modal.createTrackedDialog('New Session Review', 'Starting dialog', NewSessionReviewDialog, {
userId: MatrixClientPeg.get().getUserId(),
device,
onFinished: (r) => {
if (!r) {
/* This'll come back false if the user clicks "this wasn't me" and saw a warning dialog */
this._onLaterClick();
}
},
}, null, /* priority = */ false, /* static = */ true);
};