We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a830601 commit a4d887eCopy full SHA for a4d887e
packages/client/src/events/call.ts
@@ -76,9 +76,8 @@ export const watchCallEnded = (call: Call) => {
76
return function onCallEnded() {
77
const { callingState } = call.state;
78
if (
79
- callingState === CallingState.RINGING ||
80
- callingState === CallingState.JOINED ||
81
- callingState === CallingState.JOINING
+ callingState !== CallingState.IDLE &&
+ callingState === CallingState.LEFT
82
) {
83
call.leave({ reason: 'call.ended event received' }).catch((err) => {
84
call.logger('error', 'Failed to leave call after call.ended ', err);
0 commit comments