use of com.fanap.podchat.model.ChatResponse in project pod-chat-android-sdk by FanapSoft.
the class PodUploader method generateImageUploadResultForSendMessage.
public static ChatResponse<ResultFile> generateImageUploadResultForSendMessage(UploadToPodSpaceResult response, String uniqueId) {
ResultFile result = PodUploader.generateFileUploadResult(response);
ChatResponse<ResultFile> chatResponse = new ChatResponse<>();
chatResponse.setResult(result);
chatResponse.setUniqueId(uniqueId);
return chatResponse;
}
use of com.fanap.podchat.model.ChatResponse in project pod-chat-android-sdk by FanapSoft.
the class HashTagManager method getMentionListResponse.
public static ChatResponse<ResultHistory> getMentionListResponse(ChatMessage chatMessage) {
List<MessageVO> messageVOS = getMessageVOSFromChatMessage(chatMessage);
ResultHistory resultHistory = new ResultHistory();
resultHistory.setContentCount(chatMessage.getContentCount());
resultHistory.setHistory(messageVOS);
ChatResponse<ResultHistory> finalResponse = new ChatResponse<>();
finalResponse.setResult(resultHistory);
finalResponse.setUniqueId(chatMessage.getUniqueId());
finalResponse.setSubjectId(chatMessage.getSubjectId());
return finalResponse;
}
use of com.fanap.podchat.model.ChatResponse in project pod-chat-android-sdk by FanapSoft.
the class ContactManager method prepareGetBlockListFromCache.
public static ChatResponse<ResultBlockList> prepareGetBlockListFromCache(String uniqueId, List<BlockedContact> cacheContacts) {
ChatResponse<ResultBlockList> chatResponse = new ChatResponse<>();
chatResponse.setErrorCode(0);
chatResponse.setHasError(false);
chatResponse.setUniqueId(uniqueId);
chatResponse.setCache(true);
ResultBlockList resultBlockList = new ResultBlockList();
resultBlockList.setContacts(cacheContacts);
chatResponse.setResult(resultBlockList);
return chatResponse;
}
use of com.fanap.podchat.model.ChatResponse in project pod-chat-android-sdk by FanapSoft.
the class ContactManager method prepareAddContactResponse.
public static ChatResponse<ResultAddContact> prepareAddContactResponse(ChatMessage chatMessage) {
Contacts contacts = App.getGson().fromJson(chatMessage.getContent(), Contacts.class);
ChatResponse<ResultAddContact> chatResponse = new ChatResponse<>();
chatResponse.setUniqueId(chatMessage.getUniqueId());
ResultAddContact resultAddContact = new ResultAddContact();
resultAddContact.setContentCount(1);
Contact contact = new Contact();
contact.setCellphoneNumber(contacts.getResult().get(0).getCellphoneNumber());
contact.setEmail(contacts.getResult().get(0).getEmail());
contact.setFirstName(contacts.getResult().get(0).getFirstName());
contact.setId(contacts.getResult().get(0).getId());
contact.setLastName(contacts.getResult().get(0).getLastName());
contact.setUniqueId(contacts.getResult().get(0).getUniqueId());
// add linked user
LinkedUser linkedUser = contacts.getResult().get(0).getLinkedUser();
if (linkedUser != null)
contact.setLinkedUser(linkedUser);
resultAddContact.setContact(contact);
chatResponse.setResult(resultAddContact);
return chatResponse;
}
use of com.fanap.podchat.model.ChatResponse in project pod-chat-android-sdk by FanapSoft.
the class ContactManager method prepareContactSyncedResult.
public static ChatResponse<ContactSyncedResult> prepareContactSyncedResult(ChatMessage chatMessage) {
ChatResponse<ContactSyncedResult> response = new ChatResponse<>();
ContactSyncedResult result = new ContactSyncedResult(chatMessage.getSubjectId());
response.setResult(result);
return response;
}
Aggregations