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.
@@ -30965,7 +30965,7 @@ class ChatClientMgr {
30965
30965
  robot.chatID = robotKey;
30966
30966
  let userSig = await this.handler.getPortalUserSig(robotKey, this.imType, this.groupID);
30967
30967
  if (!userSig) {
30968
- userSig = await this.generateUserSigAndUpdate(robotKey);
30968
+ userSig = await this.generateUserSigAndAdd(robotKey);
30969
30969
  }
30970
30970
  robot.userSig = userSig;
30971
30971
  this.chatAIClient.charAIs[robotKey] = {
@@ -30977,6 +30977,28 @@ class ChatClientMgr {
30977
30977
  }
30978
30978
  }
30979
30979
  async generateUserSigAndUpdate(robotKey) {
30980
+ let sigIDObject = await this.handler.genTestUserSig({
30981
+ SDKAppID: this.appSKID,
30982
+ userID: robotKey
30983
+ });
30984
+ let userSig = sigIDObject.userSig;
30985
+ if (userSig) {
30986
+ await this.chatAIClient.login({
30987
+ userID: robotKey,
30988
+ userSig: userSig
30989
+ });
30990
+ await this.chatAIClient.logout();
30991
+ let data = {
30992
+ userID: robotKey,
30993
+ userSig: userSig,
30994
+ im_type: this.imType,
30995
+ group_id: this.groupID
30996
+ };
30997
+ await this.handler.updateIMMapping(data);
30998
+ }
30999
+ return userSig;
31000
+ }
31001
+ async generateUserSigAndAdd(robotKey) {
30980
31002
  let sigIDObject = await this.handler.genTestUserSig({
30981
31003
  SDKAppID: this.appSKID,
30982
31004
  userID: robotKey
@@ -31123,8 +31145,8 @@ const getIMHanlder = customerHanlder => {
31123
31145
  genTestUserSig: async data => {
31124
31146
  // return genTestUserSig(data);
31125
31147
  },
31126
- getChatClient: async () => {
31127
- return window.imClient;
31148
+ getChatClientClasses: async () => {
31149
+ return [];
31128
31150
  },
31129
31151
  getAIRobotInfos: async (user_id, groupID) => {
31130
31152
  return getAIRobotInfos(user_id, groupID);