mirror of https://github.com/vector-im/riot-web
implement qa feedback for closing modals when logging out
parent
88aa2a6f70
commit
12f6272ab4
|
@ -1373,14 +1373,15 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
|||
cli.on('Session.logged_out', function(errObj) {
|
||||
if (Lifecycle.isLoggingOut()) return;
|
||||
|
||||
// A modal might have been open when we were logged out by the server
|
||||
Modal.closeCurrentModal('Session.logged_out');
|
||||
|
||||
if (errObj.httpStatus === 401 && errObj.data && errObj.data['soft_logout']) {
|
||||
console.warn("Soft logout issued by server - avoiding data deletion");
|
||||
Lifecycle.softLogout();
|
||||
return;
|
||||
}
|
||||
|
||||
Modal.closeCurrentModal("User has been logged out.");
|
||||
|
||||
Modal.createTrackedDialog('Signed out', '', ErrorDialog, {
|
||||
title: _t('Signed Out'),
|
||||
description: _t('For security, this session has been signed out. Please sign in again.'),
|
||||
|
|
Loading…
Reference in New Issue