Skip to content

Commit

Permalink
Merge pull request #1951 from nextcloud/fix/noid/unneccessary-getpeer…
Browse files Browse the repository at this point in the history
…sincall-api-calls

fix: Only query "getPeersInCall" when using internal signaling
  • Loading branch information
Ivansss authored Jan 24, 2025
2 parents 439748e + 9d0b558 commit 0a2995c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions NextcloudTalk/NCCallController.m
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,15 @@ - (void)joinCall
[NCUtils log:[NSString stringWithFormat:@"Did join call in NCCallController for token %@", self.room.token]];

[self.delegate callControllerDidJoinCall:self];
[self getPeersForCall];
[self startMonitoringMicrophoneAudioLevel];

if (self->_externalSignalingController) {
if ([self->_externalSignalingController hasMCU]) {
[self createPublisherPeerConnection];
}
} else {
// Only with internal signaling we need to query the API for peers in call
[self getPeersForCall];
[self->_signalingController startPullingSignalingMessages];
}

Expand Down Expand Up @@ -820,7 +821,7 @@ - (void)checkMicAudioLevel
}];
}

#pragma mark - Call participants
#pragma mark - Call participants (internal signaling)

- (void)getPeersForCall
{
Expand Down Expand Up @@ -1506,7 +1507,7 @@ - (void)processUsersInRoom:(NSArray *)users
// Calculate sessions that join the call
[newSessions removeObjectsInArray:oldSessions];

if (newSessions.count > 0) {
if (newSessions.count > 0 && !_externalSignalingController) {
[self getPeersForCall];
}

Expand Down

0 comments on commit 0a2995c

Please sign in to comment.