[Super Group]2.3.0

This commit is contained in:
hrxiang
2022-08-24 11:46:15 +08:00
parent 72111053bd
commit a6aea5496a
9 changed files with 88 additions and 2 deletions

View File

@@ -309,6 +309,7 @@ class IMManager {
required OnConnectListener listener,
int logLevel = 6,
String objectStorage = 'cos',
String? encryptionKey,
String? operationID,
}) {
this._connectListener = listener;
@@ -323,6 +324,7 @@ class IMManager {
"data_dir": dataDir,
"log_level": logLevel,
"object_storage": objectStorage,
"encryption_key": encryptionKey,
"operationID": Utils.checkOperationID(operationID),
},
));
@@ -404,6 +406,19 @@ class IMManager {
'operationID': Utils.checkOperationID(operationID),
}));
/// 更新firebase客户端注册token
/// [fcmToken] firebase token
Future updateFcmToken({
required String fcmToken,
String? operationID,
}) =>
_channel.invokeMethod(
'updateFcmToken',
_buildParam({
'fcmToken': fcmToken,
'operationID': Utils.checkOperationID(operationID),
}));
static Map _buildParam(Map param) {
param["ManagerName"] = "imManager";
return param;

View File

@@ -731,6 +731,27 @@ class MessageManager {
.then((value) =>
Utils.toObj(value, (map) => AdvancedMessage.fromJson(map)));
/// 查找消息详细
/// [conversationID] 会话id
/// [clientMsgIDList] 消息id列表
Future<SearchResult> findMessageList({
required String conversationID,
required List<String> clientMsgIDList,
String? operationID,
}) =>
_channel
.invokeMethod(
'findMessageList',
_buildParam({
'options': {
"conversationID": conversationID,
"clientMsgIDList": clientMsgIDList,
},
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) =>
Utils.toObj(value, (map) => SearchResult.fromJson(value)));
static Map _buildParam(Map param) {
param["ManagerName"] = "messageManager";
return param;