queryLocalPrivateHistoryMessage static method
查询本地私信消息历史记录【DESC,距离当前时间最近的一条消息会在第一位】 @param uid 目标的id @param dbid 消息的数据库id —— 传0表示从最近的一条消息开始查询 @param limit 限制结果条数
Implementation
static Future<List<LVIMMsg>> queryLocalPrivateHistoryMessage(String uid, int dbid, int limit) async {
if (uid == null || dbid < 0 || limit < 0) return [];
Map map = await _channel.invokeMethod("queryLocalPrivateHistoryMessage", {
"uid": uid,
"dbid": dbid,
"limit": limit,
});
if (map["result"] <= 0 || map["msgs"] == null) return [];
List<LVIMMsg> list = [];
for (Map msgMap in map["msgs"]) {
var msg = SendMessageResult.convertFromMap(msgMap).msg;
list.add(msg);
}
return list;
}