How to use the @cometchat-pro/chat.CometChat.CALL_STATUS function in @cometchat-pro/chat

To help you get started, we’ve selected a few @cometchat-pro/chat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cometchat-pro-samples / javascript-reactjs-chat-app / src / js / store / actions / cc_action.js View on Github external
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);
      }
    );
  };
};
github cometchat-pro-samples / javascript-reactjs-chat-app / src / js / store / actions / cc_action.js View on Github external
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"));
      }
    );
  };
};