@vgroup/dialbox 0.4.167 → 0.4.169

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.
@@ -2467,35 +2467,33 @@ class CallProgressComponent {
2467
2467
  }
2468
2468
  }
2469
2469
  // let incomingCallData = this.currentCallList.filter((item: any) => item.isIncomingCall && item.isAcceptCall);
2470
- if (this.currentCallList.length > 1) {
2471
- // this.call = await this.twilioService.connect('');
2472
- this.twilioService.addIncomingParticipant(data === null || data === void 0 ? void 0 : data.id, this.twilioService.conferenceCallInfo.conferenceId).subscribe((res) => {
2473
- console.log(res, 'bhhhhhhhhhhhhhhhhhhh');
2474
- this.incomeingCallSocketService.isCurrentIncomingCallList.push((data === null || data === void 0 ? void 0 : data.id) || (data === null || data === void 0 ? void 0 : data.participantId));
2475
- this.incomeingCallSocketService.pause();
2476
- data.isAcceptCall = true;
2477
- // this.currentCall = data;
2478
- this.setIncomingCallStatus(data);
2479
- });
2480
- }
2481
- else {
2482
- // this.currentCall = data;
2483
- let payload = {
2484
- recordId: data === null || data === void 0 ? void 0 : data.id,
2485
- ipAddress: '',
2486
- ipCountry: '',
2487
- callStatus: 'answered',
2488
- deviceId: this.deviceId,
2489
- conferenceId: this.conferenceId || (data === null || data === void 0 ? void 0 : data.conferenceId) || 'no'
2490
- };
2491
- this.extensionService.setIncomingCallStatus(payload).subscribe((res) => __awaiter(this, void 0, void 0, function* () {
2492
- this.call = yield this.twilioService.connect({ conferenceId: res.conferenceId, conferenceName: res.conferenceName });
2493
- this.incomeingCallSocketService.isCurrentIncomingCallList.push(data === null || data === void 0 ? void 0 : data.id);
2494
- console.log(this.call, 'callConnect');
2495
- data.isAcceptCall = true;
2496
- this.incomeingCallSocketService.pause();
2497
- }));
2498
- }
2470
+ // if (this.currentCallList.length > 1) {
2471
+ // // this.call = await this.twilioService.connect('');
2472
+ // this.twilioService.addIncomingParticipant(data?.id, this.twilioService.conferenceCallInfo.conferenceId).subscribe((res: any) => {
2473
+ // console.log(res, 'bhhhhhhhhhhhhhhhhhhh')
2474
+ // this.incomeingCallSocketService.isCurrentIncomingCallList.push(data?.id || data?.participantId);
2475
+ // this.incomeingCallSocketService.pause();
2476
+ // data.isAcceptCall = true;
2477
+ // // this.currentCall = data;
2478
+ // this.setIncomingCallStatus(data)
2479
+ // })
2480
+ // } else {
2481
+ // this.currentCall = data;
2482
+ let payload = {
2483
+ recordId: data === null || data === void 0 ? void 0 : data.id,
2484
+ ipAddress: '',
2485
+ ipCountry: '',
2486
+ callStatus: 'answered',
2487
+ deviceId: this.deviceId,
2488
+ conferenceId: this.conferenceId || (data === null || data === void 0 ? void 0 : data.conferenceId) || 'no'
2489
+ };
2490
+ this.extensionService.setIncomingCallStatus(payload).subscribe((res) => __awaiter(this, void 0, void 0, function* () {
2491
+ this.call = yield this.twilioService.connect({ conferenceId: res.conferenceId, conferenceName: res.conferenceName });
2492
+ this.incomeingCallSocketService.isCurrentIncomingCallList.push(data === null || data === void 0 ? void 0 : data.id);
2493
+ console.log(this.call, 'callConnect');
2494
+ data.isAcceptCall = true;
2495
+ this.incomeingCallSocketService.pause();
2496
+ }));
2499
2497
  });
2500
2498
  }
2501
2499
  callContact(contact) {
@@ -3572,6 +3570,7 @@ class DialboxComponent {
3572
3570
  if (parentCall.length > 0) {
3573
3571
  this.notificationCallList = this.notificationCallList.filter((item) => !parentCall.includes(item === null || item === void 0 ? void 0 : item.participantId));
3574
3572
  this.incomingCallsList = [...this.incomingCallsList, ...this.notificationCallList];
3573
+ console.log('.....', this.notificationCallList);
3575
3574
  }
3576
3575
  else {
3577
3576
  this.incomingCallsList = [...this.incomingCallsList, ...this.notificationCallList];
@@ -3776,19 +3775,27 @@ class DialboxComponent {
3776
3775
  // deviceId: this.deviceId,
3777
3776
  // conferenceId: this.incomingCallnotification.data.data.conferenceId || 'no'
3778
3777
  // }
3779
- let incomingCall = {
3780
- conferenceId: 'no',
3781
- isActive: true,
3782
- isIncomingCall: true,
3783
- participantId: (_a = this.incomingCallnotification.data.data) === null || _a === void 0 ? void 0 : _a.participantId,
3784
- participants: [
3785
- { direction: "incoming-call", img: 'assets/images/user.jpg', isIncomingCall: true, isHold: false, isConference: false, isAcceptCall: false, dial: true, phone: (_b = this.incomingCallnotification.data.data) === null || _b === void 0 ? void 0 : _b.fromNumber, participantId: (_c = this.incomingCallnotification.data.data) === null || _c === void 0 ? void 0 : _c.participantId, name: (_d = this.incomingCallnotification.data.data) === null || _d === void 0 ? void 0 : _d.fromName, time: '', id: (_e = this.incomingCallnotification.data.data) === null || _e === void 0 ? void 0 : _e.participantId }
3786
- ]
3787
- };
3788
- this.incomingCallsList.push(incomingCall);
3789
- this.notificationCallList.push(incomingCall);
3790
- if ((_f = this.incomingCallnotification.data.data) === null || _f === void 0 ? void 0 : _f.participantId) {
3791
- this.isCallInProgress = true;
3778
+ if (this.incomingCallnotification.data.content == "IncomingCall") {
3779
+ let incomingCall = {
3780
+ conferenceId: 'no',
3781
+ isActive: true,
3782
+ isIncomingCall: true,
3783
+ participantId: (_a = this.incomingCallnotification.data.data) === null || _a === void 0 ? void 0 : _a.participantId,
3784
+ participants: [
3785
+ { direction: "incoming-call", img: 'assets/images/user.jpg', isIncomingCall: true, isHold: false, isConference: false, isAcceptCall: false, dial: true, phone: (_b = this.incomingCallnotification.data.data) === null || _b === void 0 ? void 0 : _b.fromNumber, participantId: (_c = this.incomingCallnotification.data.data) === null || _c === void 0 ? void 0 : _c.participantId, name: (_d = this.incomingCallnotification.data.data) === null || _d === void 0 ? void 0 : _d.fromName, time: '', id: (_e = this.incomingCallnotification.data.data) === null || _e === void 0 ? void 0 : _e.participantId }
3786
+ ]
3787
+ };
3788
+ this.incomingCallsList.push(incomingCall);
3789
+ this.notificationCallList.push(incomingCall);
3790
+ if ((_f = this.incomingCallnotification.data.data) === null || _f === void 0 ? void 0 : _f.participantId) {
3791
+ this.isCallInProgress = true;
3792
+ }
3793
+ }
3794
+ else if (this.incomingCallnotification.data.content == "Missed Call") {
3795
+ let index = this.notificationCallList.findIndex((call) => { var _a; return call.participantId === ((_a = this.incomingCallnotification.data.data) === null || _a === void 0 ? void 0 : _a.participantId); });
3796
+ if (index > -1) {
3797
+ this.notificationCallList.splice(index, 1);
3798
+ }
3792
3799
  }
3793
3800
  console.log('notificationCallList', this.notificationCallList);
3794
3801
  // this.extensionService.setIncomingCallStatus(payload).subscribe((res: any) => {