Search in sources :

Example 1 with AddContactVO

use of com.fanap.podchat.chat.contact.model.AddContactVO in project pod-chat-android-sdk by FanapSoft.

the class ContactManager method createAddContactRequest.

public static String createAddContactRequest(String uniqueId, String typeCode, List<String> firstNames, List<String> lastNames, List<String> userNames, List<String> cellNumbers, List<String> emails, List<String> uniqIds) {
    AddContactVO addContactVO = new AddContactVO().setEmailList(emails).setFirstNameList(firstNames).setLastNameList(lastNames).setUserNameList(userNames).setCellphoneNumberList(cellNumbers).setUniqueIdList(uniqIds);
    String content = App.getGson().toJson(addContactVO);
    AsyncMessage message = new ChatMessage();
    message.setType(ChatMessageType.Constants.ADD_CONTACT);
    message.setToken(CoreConfig.token);
    message.setTokenIssuer(CoreConfig.tokenIssuer);
    message.setTypeCode(typeCode != null ? typeCode : CoreConfig.typeCode);
    message.setContent(content);
    message.setUniqueId(uniqueId);
    return App.getGson().toJson(message);
}
Also used : ChatMessage(com.fanap.podchat.mainmodel.ChatMessage) AsyncMessage(com.fanap.podchat.mainmodel.AsyncMessage) AddContactVO(com.fanap.podchat.chat.contact.model.AddContactVO)

Aggregations

AddContactVO (com.fanap.podchat.chat.contact.model.AddContactVO)1 AsyncMessage (com.fanap.podchat.mainmodel.AsyncMessage)1 ChatMessage (com.fanap.podchat.mainmodel.ChatMessage)1