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

Commit 811ae9b

Browse files
authored
Merge pull request #5616 from dangwynne/develop
Close current modal when session is logged out
2 parents 5abced7 + 12f6272 commit 811ae9b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/components/structures/MatrixChat.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,6 +1375,9 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
13751375
cli.on('Session.logged_out', function(errObj) {
13761376
if (Lifecycle.isLoggingOut()) return;
13771377

1378+
// A modal might have been open when we were logged out by the server
1379+
Modal.closeCurrentModal('Session.logged_out');
1380+
13781381
if (errObj.httpStatus === 401 && errObj.data && errObj.data['soft_logout']) {
13791382
console.warn("Soft logout issued by server - avoiding data deletion");
13801383
Lifecycle.softLogout();
@@ -1385,6 +1388,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
13851388
title: _t('Signed Out'),
13861389
description: _t('For security, this session has been signed out. Please sign in again.'),
13871390
});
1391+
13881392
dis.dispatch({
13891393
action: 'logout',
13901394
});

0 commit comments

Comments
 (0)