getHistoryMessageList method
获取聊天记录(以startMsg为节点,以前的聊天记录)
userID
接收消息的用户id
conversationID
会话id,查询通知时可用
groupID
接收消息的组id
startMsg
从这条消息开始查询count
条,获取的列表index==length-1为最新消息,所以获取下一页历史记录startMsg=list.first
count
一次拉取的总数
Implementation
Future<List<Message>> getHistoryMessageList({
String? userID,
String? groupID,
String? conversationID,
Message? startMsg,
int? count,
String? operationID,
}) =>
_channel
.invokeMethod(
'getHistoryMessageList',
_buildParam({
'userID': userID ?? '',
'groupID': groupID ?? '',
'conversationID': conversationID ?? '',
'startClientMsgID': startMsg?.clientMsgID ?? '',
'count': count ?? 10,
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) => Utils.toList(value, (map) => Message.fromJson(map)));