use of com.fanap.podchat.model.ResultLeaveThread in project pod-chat-android-sdk by FanapSoft.
the class ThreadManager method prepareLeaveThreadResponse.
// public static List<Thread> sortThreads(List<Thread> unsorted) {
// List<Thread> sorted = new ArrayList<>(unsorted);
// Collections.sort(sorted, ThreadManager::compareThreads);
// return sorted;
// }
public static ChatResponse<ResultLeaveThread> prepareLeaveThreadResponse(ChatMessage chatMessage) {
ChatResponse<ResultLeaveThread> chatResponse = new ChatResponse<>();
ResultLeaveThread leaveThread = App.getGson().fromJson(chatMessage.getContent(), ResultLeaveThread.class);
leaveThread.setThreadId(chatMessage.getSubjectId());
chatResponse.setErrorCode(0);
chatResponse.setHasError(false);
chatResponse.setErrorMessage("");
chatResponse.setUniqueId(chatMessage.getUniqueId());
chatResponse.setResult(leaveThread);
return chatResponse;
}
Aggregations