Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: leave ringing call if accepted or rejected elsewhere #1654

Merged
merged 2 commits into from
Jan 23, 2025

Conversation

myandrienko
Copy link
Contributor

Immediately leave ringing call if it was accepted by the same user elsewhere.

@myandrienko myandrienko requested a review from oliverlaz January 23, 2025 13:48
@santhoshvai
Copy link
Member

santhoshvai commented Jan 23, 2025

maybe we should add more here? say rejected at another device.. we have this below on ringing state change

if (ended_at) {
// call was ended before it was accepted or rejected so we should leave it to idle
leaveCallIdle = true;
} else if (created_by_id && rejected_by) {
if (rejected_by[created_by_id]) {
// call was cancelled by the caller
leaveCallIdle = true;
}
} else if (receiver_id && rejected_by) {
if (rejected_by[receiver_id]) {
// call was rejected by the receiver in some other device
leaveCallIdle = true;
}
} else if (receiver_id && accepted_by) {
if (accepted_by[receiver_id]) {
// call was accepted by the receiver in some other device
leaveCallIdle = true;
}
}

@myandrienko myandrienko changed the title fix: leave ringing call if accepted elsewhere fix: leave ringing call if accepted or rejected elsewhere Jan 23, 2025
@myandrienko myandrienko merged commit 9f25adf into main Jan 23, 2025
16 checks passed
@myandrienko myandrienko deleted the leave-accepted-elsewhere branch January 23, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants