We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 742f6b5 commit 3c2abacCopy full SHA for 3c2abac
MatrixSDK/VoIP/MXCallManager.m
@@ -491,10 +491,19 @@ - (void)handleCallInvite:(MXEvent *)event
491
if (call)
492
{
493
494
- if (_callKitAdapter.maximumActiveCalls != -1 && calls.count >= _callKitAdapter.maximumActiveCalls) {
+ BOOL isOngoing = FALSE;
495
+ NSUInteger* runningCalls = 0;
496
- [call hangupWithReason: MXCallHangupReasonUserBusy];
497
+ for (MXCall *call in calls) {
498
+ if (call.state <= MXCallStateConnected) {
499
+ runningCalls += 1;
500
+ }
501
502
503
+ if (_callKitAdapter.maximumActiveCalls != -1 && runningCalls >= _callKitAdapter.maximumActiveCalls) {
504
+
505
+ [call hangupWithReason: MXCallHangupReasonUserBusy];
506
507
return;
508
}
509
0 commit comments