@vgroup/dialbox 0.3.11 → 0.3.12

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.
@@ -2546,18 +2546,7 @@ class CallProgressComponent {
2546
2546
  const contactName = [contact === null || contact === void 0 ? void 0 : contact.firstName, contact === null || contact === void 0 ? void 0 : contact.middleName, contact === null || contact === void 0 ? void 0 : contact.lastName]
2547
2547
  .filter(Boolean)
2548
2548
  .join(' ');
2549
- this.callData = {
2550
- // ...this.callData,
2551
- phone: phoneNumber,
2552
- displayNum: phoneNumber,
2553
- name: contactName || phoneNumber,
2554
- img: (contact === null || contact === void 0 ? void 0 : contact.img) || 'assets/images/user.jpg',
2555
- participantId: '',
2556
- from: (_d = this.selectedCallerId) === null || _d === void 0 ? void 0 : _d.number,
2557
- isIncomingCall: false,
2558
- };
2559
2549
  // this.call['callInfo'] = JSON.parse(JSON.stringify(this.callData));
2560
- this.cdr.detectChanges();
2561
2550
  // Get the conference ID from the current call or use the stored one
2562
2551
  const conferenceId = this.conferenceId;
2563
2552
  if (!conferenceId) {
@@ -2568,12 +2557,26 @@ class CallProgressComponent {
2568
2557
  }
2569
2558
  // Add participant to the conference
2570
2559
  let data = yield this.addParticipantToCall({
2571
- from: (_e = this.callData) === null || _e === void 0 ? void 0 : _e.from,
2560
+ from: (_d = this.callData) === null || _d === void 0 ? void 0 : _d.from,
2572
2561
  route: "OUTGOING",
2573
2562
  participantNumber: phoneNumber,
2574
2563
  conferenceId: conferenceId
2575
2564
  });
2576
- this.callData = Object.assign(Object.assign({}, this.callData), { participantId: data === null || data === void 0 ? void 0 : data.participantId });
2565
+ // this.callData = {
2566
+ // ...this.callData,
2567
+ // participantId: ,
2568
+ // }
2569
+ this.callData = {
2570
+ // ...this.callData,
2571
+ phone: phoneNumber,
2572
+ displayNum: phoneNumber,
2573
+ name: contactName || phoneNumber,
2574
+ img: (contact === null || contact === void 0 ? void 0 : contact.img) || 'assets/images/user.jpg',
2575
+ participantId: data === null || data === void 0 ? void 0 : data.participantId,
2576
+ from: (_e = this.selectedCallerId) === null || _e === void 0 ? void 0 : _e.number,
2577
+ isIncomingCall: false,
2578
+ };
2579
+ this.cdr.detectChanges();
2577
2580
  console.log(this.callData, 'this.callData');
2578
2581
  console.log('test111111');
2579
2582
  this.currentCallList.push(this.callData);
@@ -3175,12 +3178,15 @@ class DialboxComponent {
3175
3178
  this.incomeingCallSocketService.connect();
3176
3179
  try {
3177
3180
  this.incomeingCallSocketService.listen().subscribe((incomingCallData) => __awaiter(this, void 0, void 0, function* () {
3178
- var _a;
3179
3181
  // const data = JSON.parse(incomingCallData.data);
3180
3182
  console.log("WS Event Received:", incomingCallData);
3181
3183
  console.log("WS Event Received:", incomingCallData.data);
3182
3184
  this.twilioService.conferenceName = incomingCallData.conferenceName;
3183
- let participants = ((_a = incomingCallData === null || incomingCallData === void 0 ? void 0 : incomingCallData.participants) === null || _a === void 0 ? void 0 : _a.length) > 0 ? incomingCallData.participants.filter((item) => !item.isLeft) : [];
3185
+ let participants = [];
3186
+ if (incomingCallData.participants.length && incomingCallData.participants) {
3187
+ participants = incomingCallData.participants.filter((item) => !item.isLeft);
3188
+ }
3189
+ // incomingCallData.participants.length ? incomingCallData.participants.filter((item: any) => !item.isLeft) : [];
3184
3190
  if (participants.length > 0) {
3185
3191
  // this.showIncomingCallPopup(incoming, data/
3186
3192
  this.isCallInProgress = true;