getFirstUnreadMessage static method
获取会话里第一条未读消息。
conversationType
会话类型
targetId
会话 ID
Implementation
static Future<Message?> getFirstUnreadMessage(int conversationType, String targetId) async {
Map map = {"conversationType": conversationType, "targetId": targetId};
String? msgStr = await _channel.invokeMethod(RCMethodKey.GetFirstUnreadMessage, map);
if (msgStr == null) {
return null;
}
Message? msg = MessageFactory.instance!.string2Message(msgStr);
return msg;
}