Search in sources :

Example 1 with OutputSignalMessage

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

the class ChatCore method handleSystemMessage.

private void handleSystemMessage(Callback callback, ChatMessage chatMessage, String messageUniqueId) {
    if (callback != null && callback.isResult()) {
        messageCallbacks.remove(messageUniqueId);
    }
    ChatResponse<ResultSignalMessage> result = reformatSignalMessage(chatMessage);
    listenerManager.callOnGetSignalMessage(result);
    if (result == null) {
        return;
    }
    OutputSignalMessage output = new OutputSignalMessage();
    output.setResultSignalMessage(result.getResult());
    output.setSubjectId(result.getSubjectId());
    output.setUniqueId(result.getUniqueId());
    ResultSignalMessage sm = result.getResult();
    output.setSignalMessageType(getSignalMessageType(sm.getSmt()));
    output.setSignalSenderName(sm.getUser());
    if (sentryResponseLog) {
        showLog("RECEIVE_SIGNAL_MESSAGE", gson.toJson(output));
    } else {
        showLog("RECEIVE_SIGNAL_MESSAGE");
    }
    listenerManager.callOnGetSignalMessage(output);
}
Also used : OutputSignalMessage(com.fanap.podchat.model.OutputSignalMessage) ResultSignalMessage(com.fanap.podchat.model.ResultSignalMessage)

Aggregations

OutputSignalMessage (com.fanap.podchat.model.OutputSignalMessage)1 ResultSignalMessage (com.fanap.podchat.model.ResultSignalMessage)1