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.umd.js
CHANGED
|
@@ -30846,6 +30846,7 @@ class ChatClientMgr {
|
|
|
30846
30846
|
this.chatType = params.chatType || 0;
|
|
30847
30847
|
this.singleChatID = params.singleChatID || "";
|
|
30848
30848
|
this.chartOrigin = params.chartOrigin;
|
|
30849
|
+
console.log("ChatClientMgr init:", this.actionKey);
|
|
30849
30850
|
// this.charAIs = {};
|
|
30850
30851
|
}
|
|
30851
30852
|
makeKey(key) {
|
|
@@ -30890,10 +30891,10 @@ class ChatClientMgr {
|
|
|
30890
30891
|
}
|
|
30891
30892
|
return [];
|
|
30892
30893
|
});
|
|
30893
|
-
this.handler.addChatListener(this.makeKey(`sdata_get_test_user_sig`), data => {
|
|
30894
|
+
this.handler.addChatListener(this.makeKey(`sdata_get_test_user_sig`), async data => {
|
|
30894
30895
|
let sdkAppID = data.SDKAppID;
|
|
30895
30896
|
let userID = data.userID;
|
|
30896
|
-
let sigIDObject = this.handler.genTestUserSig({
|
|
30897
|
+
let sigIDObject = await this.handler.genTestUserSig({
|
|
30897
30898
|
SDKAppID: sdkAppID,
|
|
30898
30899
|
userID: userID
|
|
30899
30900
|
});
|
|
@@ -30953,12 +30954,19 @@ class ChatClientMgr {
|
|
|
30953
30954
|
robot.chatID = robotKey;
|
|
30954
30955
|
let userSig = await this.handler.getPortalUserSig(robotKey, this.imType, this.groupID);
|
|
30955
30956
|
if (!userSig) {
|
|
30956
|
-
let sigIDObject = this.handler.genTestUserSig({
|
|
30957
|
+
let sigIDObject = await this.handler.genTestUserSig({
|
|
30957
30958
|
SDKAppID: this.appSKID,
|
|
30958
30959
|
userID: robotKey
|
|
30959
30960
|
});
|
|
30960
30961
|
userSig = sigIDObject.userSig;
|
|
30961
|
-
|
|
30962
|
+
if (userSig) {
|
|
30963
|
+
await this.chatAIClient.login({
|
|
30964
|
+
userID: robotKey,
|
|
30965
|
+
userSig: userSig
|
|
30966
|
+
});
|
|
30967
|
+
await this.chatAIClient.logout();
|
|
30968
|
+
await this.handler.addIMMapping(robotKey, this.imType, userSig, this.groupID);
|
|
30969
|
+
}
|
|
30962
30970
|
}
|
|
30963
30971
|
robot.userSig = userSig;
|
|
30964
30972
|
this.chatAIClient.charAIs[robotKey] = {
|