Forcefully disconnect from video rooms on logout and tab close (#8375)

* Forcefully disconnect from video rooms on logout

* Forcefully disconnect from video rooms on tab close
This commit is contained in:
Robin 2022-04-21 07:41:58 -04:00 committed by GitHub
parent c83ad1faa7
commit dd880df6ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 18 deletions

View file

@ -131,6 +131,7 @@ import { IConfigOptions } from "../../IConfigOptions";
import { SnakedObject } from "../../utils/SnakedObject";
import InfoDialog from '../views/dialogs/InfoDialog';
import { leaveRoomBehaviour } from "../../utils/leave-behaviour";
import VideoChannelStore from "../../stores/VideoChannelStore";
// legacy export
export { default as Views } from "../../Views";
@ -576,6 +577,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
break;
case 'logout':
CallHandler.instance.hangupAllCalls();
if (VideoChannelStore.instance.connected) VideoChannelStore.instance.setDisconnected();
Lifecycle.logout();
break;
case 'require_registration':