@vgroup/dialbox 0.7.62 → 0.7.63
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.
|
@@ -4619,15 +4619,6 @@ class DialboxComponent {
|
|
|
4619
4619
|
this.twilioService.conferenceCallInfo = incomingCallData;
|
|
4620
4620
|
this.conferenceCallList.emit(incomingCallData);
|
|
4621
4621
|
this.token = localStorage.getItem('ext_token') || '';
|
|
4622
|
-
console.log('incomingCallData 235', incomingCallData);
|
|
4623
|
-
incomingCallData.forEach((callInfo) => {
|
|
4624
|
-
var _a;
|
|
4625
|
-
// Check if WE are an active participant in this conference
|
|
4626
|
-
if (!((_a = callInfo === null || callInfo === void 0 ? void 0 : callInfo.participants) === null || _a === void 0 ? void 0 : _a.length) && !this.nullParticipantCallList.includes(callInfo === null || callInfo === void 0 ? void 0 : callInfo.conferenceId)) {
|
|
4627
|
-
this.nullParticipantCallList.push(callInfo === null || callInfo === void 0 ? void 0 : callInfo.conferenceId);
|
|
4628
|
-
swal("Error", 'Call not connected facing some issue', "error");
|
|
4629
|
-
}
|
|
4630
|
-
});
|
|
4631
4622
|
if (this.token == 'logout') {
|
|
4632
4623
|
console.error('No authentication token found');
|
|
4633
4624
|
(_a = this.twilioService.device) === null || _a === void 0 ? void 0 : _a.disconnectAll();
|
|
@@ -4637,16 +4628,11 @@ class DialboxComponent {
|
|
|
4637
4628
|
incomingCallData = (incomingCallData === null || incomingCallData === void 0 ? void 0 : incomingCallData.length) > 0
|
|
4638
4629
|
? incomingCallData.filter((item) => { var _a; return ((_a = item.participants) === null || _a === void 0 ? void 0 : _a.length) > 0; })
|
|
4639
4630
|
: [];
|
|
4640
|
-
console.log('incomingCallData 251', incomingCallData);
|
|
4641
4631
|
// All conferenceIds received from socket this tick
|
|
4642
4632
|
const socketConferenceIds = incomingCallData.map((c) => c.conferenceId);
|
|
4643
4633
|
incomingCallData.forEach((callInfo) => {
|
|
4644
|
-
var _a
|
|
4634
|
+
var _a;
|
|
4645
4635
|
// Check if WE are an active participant in this conference
|
|
4646
|
-
if (!((_a = callInfo === null || callInfo === void 0 ? void 0 : callInfo.participants) === null || _a === void 0 ? void 0 : _a.length) && !this.nullParticipantCallList.includes(callInfo === null || callInfo === void 0 ? void 0 : callInfo.conferenceId)) {
|
|
4647
|
-
this.nullParticipantCallList.push(callInfo === null || callInfo === void 0 ? void 0 : callInfo.conferenceId);
|
|
4648
|
-
swal("Error", 'Call not connected facing some issue', "error");
|
|
4649
|
-
}
|
|
4650
4636
|
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)) ||
|
|
4651
4637
|
(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) &&
|
|
4652
4638
|
(resData === null || resData === void 0 ? void 0 : resData.callStatus) !== 'completed' &&
|
|
@@ -4671,7 +4657,7 @@ class DialboxComponent {
|
|
|
4671
4657
|
}
|
|
4672
4658
|
else {
|
|
4673
4659
|
// We are NOT a participant — remove from incomingCallsList only if it is NOT an incoming-call notification
|
|
4674
|
-
if (callIndex > -1 && ((
|
|
4660
|
+
if (callIndex > -1 && ((_a = this.incomingCallsList[callIndex]) === null || _a === void 0 ? void 0 : _a.direction) !== 'incoming-call') {
|
|
4675
4661
|
// FIX: splice(index, deleteCount) — was incorrectly splice(1, callIndex)
|
|
4676
4662
|
this.incomingCallsList.splice(callIndex, 1);
|
|
4677
4663
|
}
|