isdata-customer-sdk 0.1.66 → 0.1.67

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.umd.js CHANGED
@@ -30975,7 +30975,7 @@ class ChatClientMgr {
30975
30975
  robot.chatID = robotKey;
30976
30976
  let userSig = await this.handler.getPortalUserSig(robotKey, this.imType, this.groupID);
30977
30977
  if (!userSig) {
30978
- userSig = await this.generateUserSigAndUpdate(robotKey);
30978
+ userSig = await this.generateUserSigAndAdd(robotKey);
30979
30979
  }
30980
30980
  robot.userSig = userSig;
30981
30981
  this.chatAIClient.charAIs[robotKey] = {
@@ -30987,6 +30987,28 @@ class ChatClientMgr {
30987
30987
  }
30988
30988
  }
30989
30989
  async generateUserSigAndUpdate(robotKey) {
30990
+ let sigIDObject = await this.handler.genTestUserSig({
30991
+ SDKAppID: this.appSKID,
30992
+ userID: robotKey
30993
+ });
30994
+ let userSig = sigIDObject.userSig;
30995
+ if (userSig) {
30996
+ await this.chatAIClient.login({
30997
+ userID: robotKey,
30998
+ userSig: userSig
30999
+ });
31000
+ await this.chatAIClient.logout();
31001
+ let data = {
31002
+ userID: robotKey,
31003
+ userSig: userSig,
31004
+ im_type: this.imType,
31005
+ group_id: this.groupID
31006
+ };
31007
+ await this.handler.updateIMMapping(data);
31008
+ }
31009
+ return userSig;
31010
+ }
31011
+ async generateUserSigAndAdd(robotKey) {
30990
31012
  let sigIDObject = await this.handler.genTestUserSig({
30991
31013
  SDKAppID: this.appSKID,
30992
31014
  userID: robotKey
@@ -31133,8 +31155,8 @@ const getIMHanlder = customerHanlder => {
31133
31155
  genTestUserSig: async data => {
31134
31156
  // return genTestUserSig(data);
31135
31157
  },
31136
- getChatClient: async () => {
31137
- return window.imClient;
31158
+ getChatClientClasses: async () => {
31159
+ return [];
31138
31160
  },
31139
31161
  getAIRobotInfos: async (user_id, groupID) => {
31140
31162
  return getAIRobotInfos(user_id, groupID);