@vgroup/dialbox 0.4.147 → 0.4.149

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.
@@ -599,15 +599,15 @@ class ExtensionService {
599
599
  return this.http.post(environment.apiUrl + '/utilities/ext/ur/generate/conference/token', payload, httpOptions);
600
600
  }
601
601
  addParticipant(payload) {
602
- var _a, _b;
602
+ var _a, _b, _c, _d, _e, _f;
603
603
  const headers = new HttpHeaders({
604
604
  'Content-Type': 'application/json',
605
605
  'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token'),
606
606
  'ip-address': (_a = this.ipAddressInfo) === null || _a === void 0 ? void 0 : _a.ip,
607
- 'ip-country': (_b = this.ipAddressInfo) === null || _b === void 0 ? void 0 : _b.country
607
+ 'ip-country': (_c = (_b = this.ipAddressInfo) === null || _b === void 0 ? void 0 : _b.address) === null || _c === void 0 ? void 0 : _c.country
608
608
  });
609
609
  const httpOptions = { headers: headers };
610
- payload = Object.assign(Object.assign({}, payload), { proxy: this.ipAddressInfo.proxy.toString(), countrycode: this.ipAddressInfo.address.countryCode.toString() });
610
+ payload = Object.assign(Object.assign({}, payload), { proxy: (_d = this.ipAddressInfo) === null || _d === void 0 ? void 0 : _d.proxy, countrycode: (_f = (_e = this.ipAddressInfo) === null || _e === void 0 ? void 0 : _e.address) === null || _f === void 0 ? void 0 : _f.countryCode });
611
611
  console.log(payload, 'payload');
612
612
  return this.http.post(environment.apiUrl + '/utilities/ext/ur/add/participant', payload, httpOptions);
613
613
  }
@@ -3539,10 +3539,13 @@ class DialboxComponent {
3539
3539
  this.incomingCallsList = incomingCallData.participants || [];
3540
3540
  this.isCallInProgress = true;
3541
3541
  this.isDialpadHidden = false;
3542
+ this.isIncomingCallnotification = false;
3542
3543
  }
3543
3544
  else {
3544
- this.callData = [];
3545
- this.incomingCallsList = [];
3545
+ if (!this.isIncomingCallnotification) {
3546
+ this.callData = [];
3547
+ this.incomingCallsList = [];
3548
+ }
3546
3549
  // this.isCallInProgress = false;
3547
3550
  }
3548
3551
  // incomingCallData.participants.length ? incomingCallData.participants.filter((item: any) => !item.isLeft) : [];
@@ -3723,20 +3726,22 @@ class DialboxComponent {
3723
3726
  this.registerDragElement();
3724
3727
  }
3725
3728
  ngOnChanges(changes) {
3729
+ var _a, _b, _c, _d;
3726
3730
  if (changes['incomingCallnotification']) {
3727
3731
  console.log('incomingCallnotification', changes['incomingCallnotification'].currentValue);
3728
3732
  this.isIncomingCallnotification = true;
3729
- let payload = {
3730
- recordId: this.incomingCallnotification.data.data.participantId,
3731
- ipAddress: '',
3732
- ipCountry: '',
3733
- callStatus: 'answered',
3734
- deviceId: this.deviceId,
3735
- conferenceId: this.incomingCallnotification.data.data.conferenceId || 'no'
3736
- };
3737
- this.extensionService.setIncomingCallStatus(payload).subscribe((res) => {
3738
- console.log(res);
3739
- });
3733
+ // let payload = {
3734
+ // recordId: this.incomingCallnotification.data.data.participantId,
3735
+ // ipAddress: '',
3736
+ // ipCountry: '',
3737
+ // callStatus: 'answered',
3738
+ // deviceId: this.deviceId,
3739
+ // conferenceId: this.incomingCallnotification.data.data.conferenceId || 'no'
3740
+ // }
3741
+ this.incomingCallsList.push({ direction: "incoming-call", img: 'assets/images/user.jpg', isIncomingCall: true, isHold: false, isConference: false, isAcceptCall: false, dial: true, phone: (_a = this.incomingCallnotification.data.data) === null || _a === void 0 ? void 0 : _a.fromNumber, participantId: (_b = this.incomingCallnotification.data.data) === null || _b === void 0 ? void 0 : _b.participantId, name: (_c = this.incomingCallnotification.data.data) === null || _c === void 0 ? void 0 : _c.fromName, time: '', id: (_d = this.incomingCallnotification.data.data) === null || _d === void 0 ? void 0 : _d.participantId });
3742
+ // this.extensionService.setIncomingCallStatus(payload).subscribe((res: any) => {
3743
+ // console.log(res)
3744
+ // })
3740
3745
  }
3741
3746
  if (changes['deviceId']) {
3742
3747
  localStorage.setItem('deviceId', changes['deviceId'].currentValue);