ue-softphone-sdk 3.0.13 → 3.0.15

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/src/index.ts CHANGED
@@ -69,6 +69,7 @@ interface OnCallEventParams {
69
69
  success?: Function;
70
70
  message?: Function;
71
71
  error?: Function;
72
+ event?: Function;
72
73
  }
73
74
 
74
75
 
@@ -560,14 +561,19 @@ export default class ueSoftphone {
560
561
  });
561
562
 
562
563
  this.Socketinstance.on("event", (event: any) => {
564
+ // 互踢逻辑
563
565
  if (event.subType === "KICK_OFF") {
564
- this.Socketinstance.disconnect();
565
- try {
566
- ueSoftphone.webPhone.disconnect();
567
- } catch (error) {}
568
- callbacks.event({
569
- message: "坐席账户在其他地方登录"
570
- });
566
+ if (event.data.kickoff === true) {
567
+ this.Socketinstance.disconnect();
568
+ try {
569
+ ueSoftphone.webPhone.disconnect();
570
+ console.log(event,"互踢")
571
+ } catch (error) {}
572
+ callbacks.event({
573
+ message: "坐席账户在其他地方登录",
574
+ data: event
575
+ });
576
+ }
571
577
  }
572
578
  });
573
579
  }