@vgroup/dialbox 0.7.80 → 0.7.81

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.
@@ -2819,18 +2819,13 @@ class CallProgressComponent {
2819
2819
  }
2820
2820
  getStatus(res) {
2821
2821
  if ((res === null || res === void 0 ? void 0 : res.direction) == "incoming-call") {
2822
- return (res === null || res === void 0 ? void 0 : res.callStatus) == "participant-join" || (res === null || res === void 0 ? void 0 : res.callStatus) == "participant-mute" || (res === null || res === void 0 ? void 0 : res.callStatus) == "participant-hold" || (res === null || res === void 0 ? void 0 : res.callStatus) == 'connected' ? true : false;
2822
+ return (res === null || res === void 0 ? void 0 : res.callStatus) == 'ringing' ? false : !(res === null || res === void 0 ? void 0 : res.isLeft);
2823
2823
  }
2824
2824
  else if ((res === null || res === void 0 ? void 0 : res.direction) == "outgoing-call") {
2825
2825
  return true;
2826
2826
  }
2827
2827
  else {
2828
- if (res.status == 'answered' && res.direction == "incoming-call") {
2829
- return true;
2830
- }
2831
- else {
2832
- return false;
2833
- }
2828
+ return false;
2834
2829
  }
2835
2830
  }
2836
2831
  GetContactsList() {
@@ -4867,10 +4862,7 @@ class DialboxComponent {
4867
4862
  var _a;
4868
4863
  // Check if WE are an active participant in this conference
4869
4864
  const ourNumber = callInfo === null || callInfo === void 0 ? void 0 : callInfo.participants.find((resData) => ((this.deviceNumberList.includes(resData === null || resData === void 0 ? void 0 : resData.from) && (resData === null || resData === void 0 ? void 0 : resData.direction) == 'outgoing-call' && (resData === null || resData === void 0 ? void 0 : resData.client)) ||
4870
- (this.deviceNumberList.includes(resData === null || resData === void 0 ? void 0 : resData.to) && (resData === null || resData === void 0 ? void 0 : resData.direction) == 'incoming-call' && (resData === null || resData === void 0 ? void 0 : resData.client) &&
4871
- (resData === null || resData === void 0 ? void 0 : resData.callStatus) !== 'completed' &&
4872
- ((resData === null || resData === void 0 ? void 0 : resData.callStatus) == 'participant-join' || (resData === null || resData === void 0 ? void 0 : resData.callStatus) == 'participant-mute' ||
4873
- (resData === null || resData === void 0 ? void 0 : resData.callStatus) == 'participant-hold' || (resData === null || resData === void 0 ? void 0 : resData.callStatus) == 'connected'))) && !(resData === null || resData === void 0 ? void 0 : resData.isLeft) && (resData === null || resData === void 0 ? void 0 : resData.status) != 'no-answer' && (resData === null || resData === void 0 ? void 0 : resData.status) != 'canceled');
4865
+ (this.deviceNumberList.includes(resData === null || resData === void 0 ? void 0 : resData.to) && (resData === null || resData === void 0 ? void 0 : resData.direction) == 'incoming-call' && (resData === null || resData === void 0 ? void 0 : resData.client))) && !(resData === null || resData === void 0 ? void 0 : resData.isLeft));
4874
4866
  // Match the ACTIVE conference entry only — never a pending incoming-call
4875
4867
  // notification, which can share this conferenceId but must not be overwritten
4876
4868
  // with socket data (it is keyed/managed separately by participantId).
@@ -4883,10 +4875,6 @@ class DialboxComponent {
4883
4875
  else {
4884
4876
  this.incomingCallsList.push(Object.assign({}, callInfo));
4885
4877
  }
4886
- // If this was a pending incoming notification that is now accepted → remove from notificationCallList
4887
- // this.notificationCallList = this.notificationCallList.filter(
4888
- // (n: any) => n.conferenceId !== callInfo.conferenceId && (n.to == ourNumber?.to || n.to !== ourNumber?.from)
4889
- // );
4890
4878
  }
4891
4879
  else {
4892
4880
  // We are NOT a participant — remove from incomingCallsList only if it is NOT an incoming-call notification
@@ -5387,7 +5375,7 @@ class DialboxComponent {
5387
5375
  participants: [
5388
5376
  {
5389
5377
  direction: "incoming-call", businessNumber: notification.c2cBusiness, img: notification.fromImage || notification.image || 'assets/images/user.jpg', isIncomingCall: true, isHold: false, isConference: false, isAcceptCall: false, dial: true, phone: notification.fromNumber, to: notification.toNumber,
5390
- from: notification.fromNumber, fromName: notification.fromName, participantId: notification.participantId, name: notification.fromName, time: '', id: notification.participantId, conferenceId: notification.conferenceId, clientSid: notification.clientSid,
5378
+ from: notification.fromNumber, fromName: notification.fromName, participantId: notification.participantId, name: notification.fromName, time: '', id: notification.participantId, conferenceId: notification.conferenceId, clientSid: notification.clientSid, callStatus: 'ringing'
5391
5379
  }
5392
5380
  ],
5393
5381
  };