Skip to content

Commit 6eae680

Browse files
authored
fix ringing rejection when calling multiple devices (#1007)
1 parent f26cefa commit 6eae680

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

packages/stream_video/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
🐞 Fixed
88
* Improved SFU error handling in Call flow and disconnect reason handling. The disconnected call state now accurately reflects the original cause of disconnection.
9+
* Fixed an issue where rejecting a ringing call by one participant would incorrectly end the call for all other ringing participants.
910

1011
## 0.9.6
1112

packages/stream_video/lib/src/call/state/mixins/state_coordinator_mixin.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,10 @@ mixin StateCoordinatorMixin on StateNotifier<CallState> {
9292
}).toList();
9393

9494
if (state.createdByMe) {
95-
final everyoneElseRejected = state.callMembers
96-
.where((m) => m.userId != state.currentUserId)
97-
.every((m) => rejectedBy.keys.contains(m.userId));
95+
final everyoneElseRejected = state.otherParticipants.isEmpty &&
96+
state.callMembers
97+
.where((m) => m.userId != state.currentUserId)
98+
.every((m) => rejectedBy.keys.contains(m.userId));
9899

99100
if (everyoneElseRejected) {
100101
_logger.d(

packages/stream_video/lib/src/core/client_state.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ class MutableClientState implements ClientState {
116116
@override
117117
Future<void> removeActiveCall(Call call) async {
118118
if (!options.allowMultipleActiveCalls &&
119+
activeCall.hasValue &&
119120
activeCall.value?.callCid == call.callCid) {
120121
activeCall.value = null;
121122
}

packages/stream_video_flutter/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ By (only) using these callbacks the root widgets will use more efficient partial
1919

2020
🐞 Fixed
2121
* Improved SFU error handling in Call flow and disconnect reason handling. The disconnected call state now accurately reflects the original cause of disconnection.
22+
* Fixed an issue where rejecting a ringing call by one participant would incorrectly end the call for all other ringing participants.
2223

2324
## 0.9.6
2425

0 commit comments

Comments
 (0)