@koi-design/callkit 2.3.0-beta.4 → 2.3.0-beta.6

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.js CHANGED
@@ -724,7 +724,7 @@ var Call = class {
724
724
  // package.json
725
725
  var package_default = {
726
726
  name: "@koi-design/callkit",
727
- version: "2.3.0-beta.4",
727
+ version: "2.3.0-beta.6",
728
728
  description: "callkit",
729
729
  author: "koi",
730
730
  license: "ISC",
@@ -869,8 +869,6 @@ var Config = class {
869
869
  return true;
870
870
  };
871
871
  isLogin = () => this.validate();
872
- /** 判断当前坐席类型是否为 SIP */
873
- isPhoneTypeSIP = () => this.config.userInfo.phoneType === PhoneTypeEnum.SIP;
874
872
  check() {
875
873
  if (!this.isLogin()) {
876
874
  this.callKit.logger.warn("User not logged in", {
@@ -17387,7 +17385,8 @@ var CallKit = class {
17387
17385
  caller: "CallKit.register",
17388
17386
  content: {}
17389
17387
  });
17390
- if (!this.config.isPhoneTypeSIP()) {
17388
+ const { userInfo } = this.config.getConfig();
17389
+ if (userInfo.phoneType === PhoneTypeEnum.SIP) {
17391
17390
  this.connect.register();
17392
17391
  }
17393
17392
  }
@@ -17499,7 +17498,8 @@ var CallKit = class {
17499
17498
  force
17500
17499
  }
17501
17500
  });
17502
- if (this.config.isPhoneTypeSIP()) {
17501
+ const { userInfo } = this.config.getConfig();
17502
+ if (userInfo.phoneType === PhoneTypeEnum.SIP) {
17503
17503
  if (this.connect.isCalling()) {
17504
17504
  await this.hangup();
17505
17505
  }