chore: update core v3.8.1
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@openim/electron-client-sdk",
|
"name": "@openim/electron-client-sdk",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "open im sdk for node",
|
"description": "open im sdk for node",
|
||||||
"source": "src/index.ts",
|
"source": "src/index.ts",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^16.2.4",
|
"@commitlint/cli": "^16.2.4",
|
||||||
"@commitlint/config-conventional": "^16.2.4",
|
"@commitlint/config-conventional": "^16.2.4",
|
||||||
"@openim/wasm-client-sdk": "^3.8.2-beta.4",
|
"@openim/wasm-client-sdk": "^3.8.2",
|
||||||
"@rollup/plugin-alias": "^5.1.0",
|
"@rollup/plugin-alias": "^5.1.0",
|
||||||
"@rollup/plugin-terser": "^0.4.4",
|
"@rollup/plugin-terser": "^0.4.4",
|
||||||
"@types/ffi-napi": "^4.0.10",
|
"@types/ffi-napi": "^4.0.10",
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
"uuid": "^9.0.0"
|
"uuid": "^9.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@openim/wasm-client-sdk": "^3.8.2-beta.3",
|
"@openim/wasm-client-sdk": "^3.8.2",
|
||||||
"electron": ">=12.0.0"
|
"electron": ">=12.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,9 +60,16 @@ class OpenIMSDK
|
|||||||
listenerCallback: koffi.IKoffiRegisteredCallback;
|
listenerCallback: koffi.IKoffiRegisteredCallback;
|
||||||
lib: koffi.IKoffiLib;
|
lib: koffi.IKoffiLib;
|
||||||
enterprise: boolean;
|
enterprise: boolean;
|
||||||
|
basertc: boolean;
|
||||||
|
|
||||||
constructor(libPath: string, emitProxy?: EmitProxy, enterprise = false) {
|
constructor(
|
||||||
|
libPath: string,
|
||||||
|
emitProxy?: EmitProxy,
|
||||||
|
enterprise = false,
|
||||||
|
basertc = false
|
||||||
|
) {
|
||||||
super();
|
super();
|
||||||
|
this.basertc = basertc;
|
||||||
this.enterprise = enterprise;
|
this.enterprise = enterprise;
|
||||||
this.lib = koffi.load(libPath);
|
this.lib = koffi.load(libPath);
|
||||||
this.baseCallbackProto = koffi.proto('__stdcall', 'baseCallback', 'void', [
|
this.baseCallbackProto = koffi.proto('__stdcall', 'baseCallback', 'void', [
|
||||||
@@ -838,19 +845,7 @@ class OpenIMSDK
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
// advance
|
// advance
|
||||||
if (this.enterprise) {
|
if (this.basertc || this.enterprise) {
|
||||||
this.libOpenIMSDK.send_group_message_read_receipt = this.lib.func(
|
|
||||||
'__stdcall',
|
|
||||||
'send_group_message_read_receipt',
|
|
||||||
'void',
|
|
||||||
['baseCallback *', 'str', 'str', 'str']
|
|
||||||
);
|
|
||||||
this.libOpenIMSDK.get_group_message_reader_list = this.lib.func(
|
|
||||||
'__stdcall',
|
|
||||||
'get_group_message_reader_list',
|
|
||||||
'void',
|
|
||||||
['baseCallback *', 'str', 'str', 'str', 'int', 'int', 'int']
|
|
||||||
);
|
|
||||||
this.libOpenIMSDK.set_signaling_listener = this.lib.func(
|
this.libOpenIMSDK.set_signaling_listener = this.lib.func(
|
||||||
'__stdcall',
|
'__stdcall',
|
||||||
'set_signaling_listener',
|
'set_signaling_listener',
|
||||||
@@ -927,6 +922,20 @@ class OpenIMSDK
|
|||||||
['baseCallback *', 'str', 'str', 'str']
|
['baseCallback *', 'str', 'str', 'str']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (this.enterprise) {
|
||||||
|
this.libOpenIMSDK.send_group_message_read_receipt = this.lib.func(
|
||||||
|
'__stdcall',
|
||||||
|
'send_group_message_read_receipt',
|
||||||
|
'void',
|
||||||
|
['baseCallback *', 'str', 'str', 'str']
|
||||||
|
);
|
||||||
|
this.libOpenIMSDK.get_group_message_reader_list = this.lib.func(
|
||||||
|
'__stdcall',
|
||||||
|
'get_group_message_reader_list',
|
||||||
|
'void',
|
||||||
|
['baseCallback *', 'str', 'str', 'str', 'int', 'int', 'int']
|
||||||
|
);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
generateEventResponse = (
|
generateEventResponse = (
|
||||||
@@ -1075,7 +1084,7 @@ class OpenIMSDK
|
|||||||
this.libOpenIMSDK.set_advanced_msg_listener(this.listenerCallback);
|
this.libOpenIMSDK.set_advanced_msg_listener(this.listenerCallback);
|
||||||
this.libOpenIMSDK.set_batch_msg_listener(this.listenerCallback);
|
this.libOpenIMSDK.set_batch_msg_listener(this.listenerCallback);
|
||||||
this.libOpenIMSDK.set_custom_business_listener(this.listenerCallback);
|
this.libOpenIMSDK.set_custom_business_listener(this.listenerCallback);
|
||||||
if (this.enterprise) {
|
if (this.enterprise || this.basertc) {
|
||||||
this.libOpenIMSDK.set_signaling_listener(this.listenerCallback);
|
this.libOpenIMSDK.set_signaling_listener(this.listenerCallback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,8 +5,13 @@ import OpenIMSDK from './core';
|
|||||||
class OpenIMSDKMain {
|
class OpenIMSDKMain {
|
||||||
private sdk: OpenIMSDK;
|
private sdk: OpenIMSDK;
|
||||||
private webContents: WebContents[] = [];
|
private webContents: WebContents[] = [];
|
||||||
constructor(path: string, webContent?: WebContents, enterprise = false) {
|
constructor(
|
||||||
this.sdk = new OpenIMSDK(path, this.emitProxy, enterprise);
|
path: string,
|
||||||
|
webContent?: WebContents,
|
||||||
|
enterprise = false,
|
||||||
|
basertc = false
|
||||||
|
) {
|
||||||
|
this.sdk = new OpenIMSDK(path, this.emitProxy, enterprise, basertc);
|
||||||
if (webContent) {
|
if (webContent) {
|
||||||
this.webContents = [webContent];
|
this.webContents = [webContent];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user