@vgroup/dialbox 0.6.80 → 0.6.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.
- package/esm2020/lib/dialbox.component.mjs +7 -6
- package/esm2020/lib/service/twilio.service.mjs +3 -3
- package/fesm2015/vgroup-dialbox.mjs +8 -7
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +8 -7
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1503,11 +1503,11 @@ class TwilioService {
|
|
|
1503
1503
|
});
|
|
1504
1504
|
this.device.on('incoming', (call) => {
|
|
1505
1505
|
console.log('incoming call', call);
|
|
1506
|
-
this.currentCall.next(call);
|
|
1506
|
+
// this.currentCall.next(call);
|
|
1507
1507
|
this.incomingCallDetail = call;
|
|
1508
1508
|
this.isShowIncomingCall = true;
|
|
1509
1509
|
this.callType.next('INCOMING');
|
|
1510
|
-
this.currentCallState.next('incoming');
|
|
1510
|
+
// this.currentCallState.next('incoming');
|
|
1511
1511
|
});
|
|
1512
1512
|
this.device.on('error', (error) => {
|
|
1513
1513
|
console.error('Twilio Device Error:', error);
|
|
@@ -3655,9 +3655,7 @@ class DialboxComponent {
|
|
|
3655
3655
|
this.incomingCallsList.push({ ...callInfo });
|
|
3656
3656
|
}
|
|
3657
3657
|
// If this was a pending incoming notification that is now accepted → remove from notificationCallList
|
|
3658
|
-
|
|
3659
|
-
// (n: any) => n.conferenceId !== callInfo.conferenceId
|
|
3660
|
-
// );
|
|
3658
|
+
this.notificationCallList = this.notificationCallList.filter((n) => n.conferenceId !== callInfo.conferenceId);
|
|
3661
3659
|
}
|
|
3662
3660
|
else {
|
|
3663
3661
|
// We are NOT a participant — remove from incomingCallsList only if it is NOT an incoming-call notification
|
|
@@ -3674,7 +3672,7 @@ class DialboxComponent {
|
|
|
3674
3672
|
this.notificationCallList = this.notificationCallList.filter((res) => res.endTime >= new Date().getTime());
|
|
3675
3673
|
// FIX: Merge notificationCallList ONCE (not inside forEach) and avoid duplicates by conferenceId
|
|
3676
3674
|
const existingIds = new Set(this.incomingCallsList.map((r) => r.conferenceId && r?.direction != 'incoming-call'));
|
|
3677
|
-
const notificationsToAdd = this.notificationCallList.filter((n) => !existingIds.has(n.conferenceId));
|
|
3675
|
+
const notificationsToAdd = this.notificationCallList.filter((n) => !existingIds.has(n.conferenceId) && this.twilioService.isShowIncomingCall);
|
|
3678
3676
|
this.incomingCallsList = [...this.incomingCallsList, ...notificationsToAdd];
|
|
3679
3677
|
// Final deduplication by conferenceId (socket data wins — last write wins)
|
|
3680
3678
|
const seen = new Map();
|
|
@@ -3687,6 +3685,7 @@ class DialboxComponent {
|
|
|
3687
3685
|
this.isDialpadHidden = false;
|
|
3688
3686
|
this.isLoadershow = false;
|
|
3689
3687
|
this.isIncomingCallnotification = false;
|
|
3688
|
+
this.cdk.detectChanges();
|
|
3690
3689
|
}
|
|
3691
3690
|
else {
|
|
3692
3691
|
if (!this.isIncomingCallnotification) {
|
|
@@ -3775,11 +3774,12 @@ class DialboxComponent {
|
|
|
3775
3774
|
this.newIncomingCalls.push(incomingCallData);
|
|
3776
3775
|
console.log('325', incomingCallData);
|
|
3777
3776
|
this.getUserInformation(incomingCallData);
|
|
3777
|
+
this.cdk.detectChanges();
|
|
3778
3778
|
}
|
|
3779
3779
|
else {
|
|
3780
3780
|
incomingCallData['isFirstCall'] = true;
|
|
3781
3781
|
console.log('dd1');
|
|
3782
|
-
|
|
3782
|
+
this.isCallInProgress = true;
|
|
3783
3783
|
this.isDialpadHidden = false;
|
|
3784
3784
|
this.callData.phone = incomingCallData.parameters['From'];
|
|
3785
3785
|
console.log('dd2');
|
|
@@ -3787,6 +3787,7 @@ class DialboxComponent {
|
|
|
3787
3787
|
this.callData.name = incomingCallData.customParameters.get('name');
|
|
3788
3788
|
this.callData.img = incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
|
|
3789
3789
|
this.callData.isIncomingCall = true;
|
|
3790
|
+
this.cdk.detectChanges();
|
|
3790
3791
|
}
|
|
3791
3792
|
incomingCallData.on('cancel', () => {
|
|
3792
3793
|
// this.incomingCallsList = this.incomingCallsList.filter((item: any) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|