getReciveMessageType static method
Implementation
static String getReciveMessageType(Map<String, dynamic> messageItem) {
final convType = messageItem['conversationType'];
final messageType = messageItem['type'];
if (convType == ConversationTypeWeb.CONV_C2C &&
messageType == MsgType.MSG_TEXT) {
return 'onRecvC2CTextMessage';
}
if (convType == ConversationTypeWeb.CONV_GROUP &&
messageType == MsgType.MSG_TEXT) {
return 'onRecvGroupTextMessage';
}
if (convType == ConversationTypeWeb.CONV_C2C &&
messageType == MsgType.MSG_CUSTOM) {
return 'onRecvC2CCustomMessage';
}
if (convType == ConversationTypeWeb.CONV_GROUP &&
messageType == MsgType.MSG_CUSTOM) {
return 'onRecvGroupCustomMessage';
}
return '';
}