Skip to content

Commit

Permalink
Merge pull request #83 from signalwire/joao/fix_double_dial
Browse files Browse the repository at this point in the history
Fix the double dial issue when dialing from the modal buttons.
  • Loading branch information
jpsantosbh authored Apr 12, 2024
2 parents e09c508 + c9b5f9d commit a0fbb30
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions public/full.js
Original file line number Diff line number Diff line change
Expand Up @@ -1604,26 +1604,26 @@ async function openMessageModal(data) {
if (data.channels.audio) {
const audioBtn = contactBtnDiv.querySelector('.btn-dial-audio')
audioBtn.classList.remove('d-none')
audioBtn.addEventListener('click', () => {
audioBtn.onclick = () => {
dialAddress(data.channels.audio)
modal.hide()
})
}
}
if (data.channels.video) {
const videoBtn = contactBtnDiv.querySelector('.btn-dial-video')
videoBtn.classList.remove('d-none')
videoBtn.addEventListener('click', () => {
videoBtn.onclick = () => {
dialAddress(data.channels.video)
modal.hide()
})
}
}
if (data.channels.messaging) {
const messagingBtn = contactBtnDiv.querySelector('.btn-dial-messaging')
messagingBtn.classList.remove('d-none')
messagingBtn.addEventListener('click', () => {
messagingBtn.onclick = () => {
dialAddress(data.channels.messaging)
modal.hide()
})
}
}
}

Expand Down

0 comments on commit a0fbb30

Please sign in to comment.