isdata-customer-sdk 0.1.63 → 0.1.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.common.js +12 -4
- package/dist/index.common.js.map +1 -1
- package/dist/index.umd.js +12 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.common.js
CHANGED
|
@@ -30836,6 +30836,7 @@ class ChatClientMgr {
|
|
|
30836
30836
|
this.chatType = params.chatType || 0;
|
|
30837
30837
|
this.singleChatID = params.singleChatID || "";
|
|
30838
30838
|
this.chartOrigin = params.chartOrigin;
|
|
30839
|
+
console.log("ChatClientMgr init:", this.actionKey);
|
|
30839
30840
|
// this.charAIs = {};
|
|
30840
30841
|
}
|
|
30841
30842
|
makeKey(key) {
|
|
@@ -30880,10 +30881,10 @@ class ChatClientMgr {
|
|
|
30880
30881
|
}
|
|
30881
30882
|
return [];
|
|
30882
30883
|
});
|
|
30883
|
-
this.handler.addChatListener(this.makeKey(`sdata_get_test_user_sig`), data => {
|
|
30884
|
+
this.handler.addChatListener(this.makeKey(`sdata_get_test_user_sig`), async data => {
|
|
30884
30885
|
let sdkAppID = data.SDKAppID;
|
|
30885
30886
|
let userID = data.userID;
|
|
30886
|
-
let sigIDObject = this.handler.genTestUserSig({
|
|
30887
|
+
let sigIDObject = await this.handler.genTestUserSig({
|
|
30887
30888
|
SDKAppID: sdkAppID,
|
|
30888
30889
|
userID: userID
|
|
30889
30890
|
});
|
|
@@ -30943,12 +30944,19 @@ class ChatClientMgr {
|
|
|
30943
30944
|
robot.chatID = robotKey;
|
|
30944
30945
|
let userSig = await this.handler.getPortalUserSig(robotKey, this.imType, this.groupID);
|
|
30945
30946
|
if (!userSig) {
|
|
30946
|
-
let sigIDObject = this.handler.genTestUserSig({
|
|
30947
|
+
let sigIDObject = await this.handler.genTestUserSig({
|
|
30947
30948
|
SDKAppID: this.appSKID,
|
|
30948
30949
|
userID: robotKey
|
|
30949
30950
|
});
|
|
30950
30951
|
userSig = sigIDObject.userSig;
|
|
30951
|
-
|
|
30952
|
+
if (userSig) {
|
|
30953
|
+
await this.chatAIClient.login({
|
|
30954
|
+
userID: robotKey,
|
|
30955
|
+
userSig: userSig
|
|
30956
|
+
});
|
|
30957
|
+
await this.chatAIClient.logout();
|
|
30958
|
+
await this.handler.addIMMapping(robotKey, this.imType, userSig, this.groupID);
|
|
30959
|
+
}
|
|
30952
30960
|
}
|
|
30953
30961
|
robot.userSig = userSig;
|
|
30954
30962
|
this.chatAIClient.charAIs[robotKey] = {
|