getAdvancedHistoryMessageList method
Get chat history (messages prior to startMsg)
conversationID
Conversation ID, can be used for querying notifications
startMsg
Query count
messages starting from this message. The message at index == length - 1 is the latest message, so to get the next page of history, use startMsg = list.first
count
Total number of messages to retrieve in one request
lastMinSeq
Not required for the first page of messages, but necessary for getting the second page of history. Same as startMsg
Implementation
Future<AdvancedMessage> getAdvancedHistoryMessageList({
String? conversationID,
Message? startMsg,
int? lastMinSeq,
int? count,
String? operationID,
}) =>
_channel
.invokeMethod(
'getAdvancedHistoryMessageList',
_buildParam({
'conversationID': conversationID ?? '',
'startClientMsgID': startMsg?.clientMsgID ?? '',
'count': count ?? 40,
'lastMinSeq': lastMinSeq ?? 0,
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) => Utils.toObj(value, (map) => AdvancedMessage.fromJson(map)));