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(call): Fix call notification when being pinged again after leavin… #13979

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions lib/Service/ParticipantService.php
Original file line number Diff line number Diff line change
Expand Up @@ -1653,6 +1653,18 @@ public function checkIfUserIsMissingCall(string $token, string $userId): int {
if ($activeSince->getTimestamp() >= $row['last_joined_call']) {
return CallNotificationController::CASE_STILL_CURRENT;
}

// The participant had joined the call, but left again.
// In this case we should not ring any more, but clients stop
// pinging the endpoint 45s after receiving the push anyway.
// However, it is also possible that the participant was ringed
// again by a moderator after they had joined the call before.
// So if a client pings the endpoint after 45s initial ringing
// + 15 seconds for worst case push notification delay, we will
// again tell them to show the call notification.
if (($activeSince->getTimestamp() + 45 + 15) < $this->timeFactory->getTime()) {
return CallNotificationController::CASE_STILL_CURRENT;
}
return CallNotificationController::CASE_PARTICIPANT_JOINED;
}

Expand Down
Loading