ue-softphone-sdk 2.2.4 → 2.2.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/new-index.ts +10 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ue-softphone-sdk",
3
- "version": "2.2.4",
3
+ "version": "2.2.5",
4
4
  "description": "ue-softphone-sdk",
5
5
  "main": "dist/ue-softphone-sdk.js",
6
6
  "scripts": {
package/src/new-index.ts CHANGED
@@ -428,7 +428,8 @@ export default class ueSoftphone {
428
428
  server,
429
429
  loginType,
430
430
  loginInfo.data.pushServer,
431
- loginInfo.data.agent
431
+ loginInfo.data.agent,
432
+ options.success
432
433
  );
433
434
  if (loginType === "WEBRTC") {
434
435
  this.getWebrtcInfo(server, options);
@@ -635,7 +636,13 @@ export default class ueSoftphone {
635
636
  // }
636
637
  // };
637
638
  // 电话条事件回调
638
- private initAttachEvent = (server: any, loginType: string, options: any, userOptions: any) => {
639
+ private initAttachEvent = (
640
+ server: any,
641
+ loginType: string,
642
+ options: any,
643
+ userOptions: any,
644
+ success
645
+ ) => {
639
646
  if (this.attachEventCallbacks) {
640
647
  // 每次创建链接的时候,要获取最新的ws token
641
648
  ueSoftphone.request(server + "/platform/action/refreshWsToken", {
@@ -670,6 +677,7 @@ export default class ueSoftphone {
670
677
  transports: ["websocket"],
671
678
  timeout: 5000
672
679
  };
680
+ this.attachEventCallbacks.success = success;
673
681
  ueSoftphone.createEventHandle(this.attachEventCallbacks);
674
682
  }
675
683
  },