Search in sources :

Example 1 with GetUserBotsResult

use of com.fanap.podchat.chat.bot.result_model.GetUserBotsResult in project pod-chat-android-sdk by FanapSoft.

the class BotManager method handleOnUserBots.

public static ChatResponse<GetUserBotsResult> handleOnUserBots(ChatMessage chatMessage) {
    ChatResponse<GetUserBotsResult> response = new ChatResponse<>();
    GetUserBotsResult result = new GetUserBotsResult(App.getGson().fromJson(chatMessage.getContent(), new TypeToken<List<BotVo>>() {
    }.getType()));
    response.setResult(result);
    response.setUniqueId(chatMessage.getUniqueId());
    response.setSubjectId(chatMessage.getSubjectId());
    return response;
}
Also used : ChatResponse(com.fanap.podchat.model.ChatResponse) ArrayList(java.util.ArrayList) List(java.util.List) GetUserBotsResult(com.fanap.podchat.chat.bot.result_model.GetUserBotsResult)

Aggregations

GetUserBotsResult (com.fanap.podchat.chat.bot.result_model.GetUserBotsResult)1 ChatResponse (com.fanap.podchat.model.ChatResponse)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1