Merge pull request #5756 from SimonBrandner/hangup-all-on-logout
Hangup all calls on logout
This commit is contained in:
commit
0e0ccfea88
2 changed files with 6 additions and 0 deletions
|
@ -788,6 +788,11 @@ export default class CallHandler {
|
||||||
// don't remove the call yet: let the hangup event handler do it (otherwise it will throw
|
// don't remove the call yet: let the hangup event handler do it (otherwise it will throw
|
||||||
// the hangup event away)
|
// the hangup event away)
|
||||||
break;
|
break;
|
||||||
|
case 'hangup_all':
|
||||||
|
for (const call of this.calls.values()) {
|
||||||
|
call.hangup(CallErrorCode.UserHangup, false);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'answer': {
|
case 'answer': {
|
||||||
if (!this.calls.has(payload.room_id)) {
|
if (!this.calls.has(payload.room_id)) {
|
||||||
return; // no call to answer
|
return; // no call to answer
|
||||||
|
|
|
@ -582,6 +582,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'logout':
|
case 'logout':
|
||||||
|
dis.dispatch({action: "hangup_all"});
|
||||||
Lifecycle.logout();
|
Lifecycle.logout();
|
||||||
break;
|
break;
|
||||||
case 'require_registration':
|
case 'require_registration':
|
||||||
|
|
Loading…
Reference in a new issue