Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handleTerminatedEvent = () => {
const {
setCallFinished,
call: { additionalCalls, tempRemote, remote, onCall, uuid },
removeAdditionalCall
} = this.props;
logMessage(`additionalCalls: ${additionalCalls}`);
if (additionalCalls > 0) {
removeAdditionalCall();
this.addCallToRecentCalls(tempRemote);
setCallFinished(true, remote);
} else {
this.addCallToRecentCalls(onCall ? remote : tempRemote);
setCallFinished();
}
RNCallKeep.endCall(this.getCurrentCallId());
};
const hangup = (callUUID) => {
RNCallKeep.endCall(callUUID);
removeCall(callUUID);
};
endCall() {
RNCallKeep.endCall(this.callKitUuid);
}
hangUpCurrentCallAction = () => {
const {
call: { uuid }
} = this.props;
const { toneAPI } = this.state;
toneOutMessage(`Hang up current call`);
RNCallKeep.endCall(uuid);
return toneAPI.hangUp();
};