From fcffe85629b888e99f637116bc7540921e5674a4 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 29 Feb 2024 14:41:07 +0100 Subject: [PATCH] fix(federation): Don't break/throttle when the invite was not accepted Signed-off-by: Joas Schilling --- lib/Federation/CloudFederationProviderTalk.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/Federation/CloudFederationProviderTalk.php b/lib/Federation/CloudFederationProviderTalk.php index 5dd96ce58a0..adf439b65c2 100644 --- a/lib/Federation/CloudFederationProviderTalk.php +++ b/lib/Federation/CloudFederationProviderTalk.php @@ -265,8 +265,14 @@ private function shareUnshared(int $remoteAttendeeId, array $notification): arra } $this->invitationMapper->delete($invite); - $participant = $this->participantService->getParticipantByActor($room, Attendee::ACTOR_USERS, $invite->getUserId()); - $this->participantService->removeAttendee($room, $participant, AAttendeeRemovedEvent::REASON_REMOVED); + + try { + $participant = $this->participantService->getParticipantByActor($room, Attendee::ACTOR_USERS, $invite->getUserId()); + $this->participantService->removeAttendee($room, $participant, AAttendeeRemovedEvent::REASON_REMOVED); + } catch (ParticipantNotFoundException) { + // Never accepted the invite + } + return []; } @@ -373,7 +379,8 @@ private function messagePosted(int $remoteAttendeeId, array $notification): arra try { $participant = $this->participantService->getParticipant($room, $invite->getUserId(), false); } catch (ParticipantNotFoundException) { - throw new ShareNotFound(); + // Not accepted the invite yet + return []; } $this->participantService->updateUnreadInfoForProxyParticipant(