This commit is contained in:
hrxiang
2022-12-08 12:05:21 +08:00
parent 4c540fbff5
commit 3b5f47c9f0
13 changed files with 78 additions and 4 deletions

View File

@@ -313,6 +313,15 @@ class IMManager {
organizationManager.listener.organizationUpdated();
break;
}
} else if (call.method == ListenerType.customBusinessListener) {
String type = call.arguments['type'];
String data = call.arguments['data'];
switch (type) {
case 'onRecvCustomBusinessMessage':
messageManager.customBusinessListener?.onRecvCustomBusinessMessage
?.call(data);
break;
}
}
} catch (err) {
print(
@@ -329,6 +338,8 @@ class IMManager {
/// [dataDir] SDK数据库存储目录
/// [objectStorage] 存储对象 cos/minio
/// [logLevel] 日志 1不打印
/// [enabledEncryption] true加密
/// [enabledCompression] true压缩
Future<dynamic> initSDK({
required int platform,
required String apiAddr,
@@ -339,6 +350,7 @@ class IMManager {
String objectStorage = 'cos',
String? encryptionKey,
bool enabledEncryption = false,
bool enabledCompression = false,
String? operationID,
}) {
this._connectListener = listener;
@@ -355,6 +367,7 @@ class IMManager {
"object_storage": objectStorage,
"encryption_key": encryptionKey,
"is_need_encryption": enabledEncryption,
"is_compression ": enabledCompression,
"operationID": Utils.checkOperationID(operationID),
},
));