@vgroup/dialbox 0.5.39 → 0.5.41

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.
@@ -1833,12 +1833,13 @@ class CallProgressComponent {
1833
1833
  this.newIncomingCallsList.forEach((callInfo, i) => {
1834
1834
  this.conferenceId = i == 0 ? this.newIncomingCallsList[i].conferenceId : this.conferenceId;
1835
1835
  this.newIncomingCallsList[i].participants.forEach(async (res) => {
1836
+ let contact = this.contacts.find((resData) => resData?.numbersList[0]?.number == (res.direction == "incoming-call" ? res?.from : res?.to));
1836
1837
  if (this.currentCallList.length > 0) {
1837
1838
  let index = this.currentCallList.findIndex((item) => item.id == res.id);
1838
1839
  if (index == -1 && !res.isLeft) {
1839
1840
  this.currentCallList.push({
1840
1841
  ...res,
1841
- img: 'assets/images/user.jpg',
1842
+ img: res?.image || contact?.image || 'assets/images/user.jpg',
1842
1843
  isIncomingCall: res.direction == "incoming-call",
1843
1844
  isHold: res.isHold,
1844
1845
  isMute: false,
@@ -1894,7 +1895,7 @@ class CallProgressComponent {
1894
1895
  else if (index != -1) {
1895
1896
  this.currentCallList[index] = {
1896
1897
  ...res,
1897
- img: 'assets/images/user.jpg',
1898
+ img: res?.image || contact?.image || 'assets/images/user.jpg',
1898
1899
  isIncomingCall: res.direction == "incoming-call",
1899
1900
  isHold: res.isHold,
1900
1901
  isMute: false,
@@ -1912,7 +1913,7 @@ class CallProgressComponent {
1912
1913
  else if (!res.isLeft) {
1913
1914
  this.currentCallList.push({
1914
1915
  ...res,
1915
- img: 'assets/images/user.jpg',
1916
+ img: res?.image || contact?.image || 'assets/images/user.jpg',
1916
1917
  isIncomingCall: res.direction == "incoming-call",
1917
1918
  isHold: res.isHold,
1918
1919
  isMute: false,
@@ -3617,8 +3618,9 @@ class DialboxComponent {
3617
3618
  if (!this.isIncomingCallnotification) {
3618
3619
  this.callData = [];
3619
3620
  this.incomingCallsList = [];
3621
+ this.isCallInProgress = false;
3622
+ this.twilioService.device?.disconnectAll();
3620
3623
  }
3621
- // this.isCallInProgress = false;
3622
3624
  }
3623
3625
  // incomingCallData.participants.length ? incomingCallData.participants.filter((item: any) => !item.isLeft) : [];
3624
3626
  // this.initializeTwilio();
@@ -4002,7 +4004,7 @@ class DialboxComponent {
4002
4004
  isIncomingCall: true,
4003
4005
  participantId: this.incomingCallnotification.data.data?.participantId,
4004
4006
  participants: [
4005
- { direction: "incoming-call", img: 'assets/images/user.jpg', isIncomingCall: true, isHold: false, isConference: false, isAcceptCall: false, dial: true, phone: this.incomingCallnotification.data.data?.fromNumber, to: this.incomingCallnotification.data.data?.toNumber,
4007
+ { direction: "incoming-call", img: this.incomingCallnotification.data.data?.image || 'assets/images/user.jpg', isIncomingCall: true, isHold: false, isConference: false, isAcceptCall: false, dial: true, phone: this.incomingCallnotification.data.data?.fromNumber, to: this.incomingCallnotification.data.data?.toNumber,
4006
4008
  from: this.incomingCallnotification.data.data?.fromNumber, fromName: this.incomingCallnotification.data.data?.fromName, participantId: this.incomingCallnotification.data.data?.participantId, name: this.incomingCallnotification.data.data?.fromName, time: '', id: this.incomingCallnotification.data.data?.participantId }
4007
4009
  ],
4008
4010
  };