handleCustomMessage static method
Implementation
static (String, String?) handleCustomMessage(V2TimMessage message) {
final customElem = message.customElem;
String lineOne = "[${tL10n.custom}]";
String? lineTwo;
if (customElem?.data == "group_create") {
lineOne = "Group chat created successfully!";
}
if (isVoteMessage(message)) {
lineOne = "[${tL10n.poll}]";
}
if (isRobotMessage(message)) {
lineOne = "[机器人消息]";
}
final callingMessage = CallingMessage.getCallMessage(message);
if (callingMessage != null && callingMessage.isCallingSignal) {
lineOne = callingMessage.getContent();
return (lineOne, lineTwo);
}
if (lineOne == "[${tL10n.custom}]") {
debugPrint(message.customElem!.toJson().toString());
}
return (lineOne, lineTwo);
}