Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const rejectCall = call => {
var sessionID = call.sessionId;
var status = CometChat.CALL_STATUS.REJECTED;
return dispatch => {
CometChat.rejectCall(sessionID, status).then(
call => {
dispatch(updateCallToReject(call, "reject call"));
},
error => {
console.log("Call rejection failed with error:", error);
}
);
};
};
export const cancelCall = call => {
var sessionID = call.sessionId;
var status = CometChat.CALL_STATUS.CANCELLED;
return dispatch => {
CometChat.rejectCall(sessionID, status).then(
call => {
dispatch(updateCallToCancel(call, "reject call"));
},
error => {
dispatch(updateCallToCancel(call, "reject call"));
}
);
};
};