getRevokedMessage static method
Implementation
static RevokedMessageInfo? getRevokedMessage(NIMMessage message) {
RevokedMessageInfo? revokedMessageInfo;
var textMsg =
message.messageType == NIMMessageType.text ? message.content : null;
var multiMap = MessageHelper.parseMultiLineMessage(message);
if (textMsg?.isNotEmpty == true || multiMap?.isNotEmpty == true) {
revokedMessageInfo = RevokedMessageInfo(
reeditMessage: textMsg, multiLineMessage: multiMap);
var replyMessageInfoMap =
message.remoteExtension?[ChatMessage.keyReplyMsgKey] as Map?;
if (replyMessageInfoMap != null) {
revokedMessageInfo.replyMsgId = ReplyMessageInfo.fromMap(
replyMessageInfoMap.cast<String, dynamic>())
.idClient;
}
var aitInfo = message.remoteExtension?[ChatMessage.keyAitMsg] as Map?;
if (aitInfo != null) {
revokedMessageInfo.aitContactsModel =
AitContactsModel.fromMap(aitInfo.cast<String, dynamic>());
}
}
return revokedMessageInfo;
}