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