use of com.fanap.podchat.call.result_model.CallStartResult in project pod-chat-android-sdk by FanapSoft.
the class CallAsyncRequestsManager method fillResult.
public static ChatResponse<CallStartResult> fillResult(ChatResponse<StartedCallModel> callResponse) {
ChatResponse<CallStartResult> response = new ChatResponse<>();
ArrayList<CallParticipantVO> callPartners = new ArrayList<>();
if (Util.isNotNullOrEmpty(callResponse.getResult().getOtherClientDtoList())) {
for (ClientDTO client : callResponse.getResult().getOtherClientDtoList()) {
if (!client.getUserId().equals(CoreConfig.userId)) {
CallParticipantVO partner = new CallParticipantVO();
partner.setUserId(client.getUserId());
partner.setMute(client.getMute());
partner.setVideo(client.getVideo());
callPartners.add(partner);
}
}
}
CallStartResult result = new CallStartResult(callResponse.getResult().getCallName(), callResponse.getResult().getCallImage(), callPartners);
response.setResult(result);
response.setSubjectId(callResponse.getSubjectId());
response.setUniqueId(callResponse.getUniqueId());
return response;
}
Aggregations