use of com.fanap.podchat.call.result_model.CallCancelResult in project pod-chat-android-sdk by FanapSoft.
the class CallAsyncRequestsManager method handleOnCallCanceled.
public static ChatResponse<CallCancelResult> handleOnCallCanceled(ChatMessage chatMessage) {
ChatResponse<CallCancelResult> response = new ChatResponse<>();
try {
CallParticipantVO participantVO = App.getGson().fromJson(chatMessage.getContent(), CallParticipantVO.class);
CallCancelResult result = new CallCancelResult(participantVO);
response.setResult(result);
response.setHasError(false);
response.setUniqueId(chatMessage.getUniqueId());
response.setSubjectId(chatMessage.getSubjectId());
response.setCache(false);
return response;
} catch (Exception e) {
e.printStackTrace();
response.setCache(false);
response.setHasError(true);
response.setUniqueId(chatMessage.getUniqueId());
response.setSubjectId(chatMessage.getSubjectId());
response.setErrorCode(ChatConstant.ERROR_CODE_INVALID_DATA);
response.setErrorMessage(ChatConstant.ERROR_INVALID_DATA);
return response;
}
}
Aggregations