getMessageSummary static method
String
getMessageSummary(
- V2TimMessage message
)
Implementation
static String getMessageSummary(V2TimMessage message){
String messageSummary = "";
switch (message.elemType) {
case MessageElemType.V2TIM_ELEM_TYPE_CUSTOM:
messageSummary = TIM_t("自定义消息");
break;
case MessageElemType.V2TIM_ELEM_TYPE_FACE:
messageSummary = TIM_t("表情消息");
break;
case MessageElemType.V2TIM_ELEM_TYPE_FILE:
messageSummary = TIM_t("文件消息");
break;
case MessageElemType.V2TIM_ELEM_TYPE_GROUP_TIPS:
messageSummary = TIM_t("群提示消息");
break;
case MessageElemType.V2TIM_ELEM_TYPE_IMAGE:
messageSummary = TIM_t("图片消息");
break;
case MessageElemType.V2TIM_ELEM_TYPE_LOCATION:
messageSummary = TIM_t("位置消息");
break;
case MessageElemType.V2TIM_ELEM_TYPE_MERGER:
messageSummary = TIM_t("合并转发消息");
break;
case MessageElemType.V2TIM_ELEM_TYPE_SOUND:
messageSummary = TIM_t("语音消息");
break;
case MessageElemType.V2TIM_ELEM_TYPE_TEXT:
messageSummary = message.textElem!.text!;
break;
case MessageElemType.V2TIM_ELEM_TYPE_VIDEO:
messageSummary = TIM_t("视频消息");
break;
}
return messageSummary;
}