From e6cad37670bf085e97c5420e0ef86d2b562d6733 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 27 Mar 2024 16:32:39 +0100 Subject: [PATCH] trying to clear Signed-off-by: Joas Schilling --- lib/Controller/FederationController.php | 4 ++++ lib/Federation/CloudFederationProviderTalk.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/Controller/FederationController.php b/lib/Controller/FederationController.php index 7351544e6b9..9018fb945eb 100644 --- a/lib/Controller/FederationController.php +++ b/lib/Controller/FederationController.php @@ -116,6 +116,8 @@ public function acceptShare(int $id): DataResponse { $return = $this->fedInviteCountCache?->remove($user->getUID()); \OC::$server->getLogger()->error('$this->fedInviteCountCache->remove(): ' . json_encode([$user->getUID(), $return])); + $return = $this->fedInviteCountCache?->clear(); + \OC::$server->getLogger()->error('$this->fedInviteCountCache->clear(): ' . json_encode([$return])); } catch (CannotReachRemoteException) { return new DataResponse(['error' => 'remote'], Http::STATUS_GONE); } catch (UnauthorizedException $e) { @@ -156,6 +158,8 @@ public function rejectShare(int $id): DataResponse { $return = $this->fedInviteCountCache?->remove($user->getUID()); \OC::$server->getLogger()->error('$this->fedInviteCountCache->remove(): ' . json_encode([$user->getUID(), $return])); + $return = $this->fedInviteCountCache?->clear(); + \OC::$server->getLogger()->error('$this->fedInviteCountCache->clear(): ' . json_encode([$return])); } catch (UnauthorizedException $e) { return new DataResponse([], Http::STATUS_NOT_FOUND); } catch (\InvalidArgumentException $e) { diff --git a/lib/Federation/CloudFederationProviderTalk.php b/lib/Federation/CloudFederationProviderTalk.php index 05ffd90df91..4b074f01c85 100644 --- a/lib/Federation/CloudFederationProviderTalk.php +++ b/lib/Federation/CloudFederationProviderTalk.php @@ -183,6 +183,8 @@ public function shareReceived(ICloudFederationShare $share): string { $this->notifyAboutNewShare($shareWith, (string) $invite->getId(), $sharedByFederatedId, $sharedByDisplayName, $roomName, $roomToken, $remote); $return = $this->fedInviteCountCache?->remove($invite->getUserId()); \OC::$server->getLogger()->error('$this->fedInviteCountCache->remove(): ' . json_encode([$invite->getUserId(), $return])); + $return = $this->fedInviteCountCache?->clear(); + \OC::$server->getLogger()->error('$this->fedInviteCountCache->clear(): ' . json_encode([$return])); return (string) $invite->getId(); } @@ -294,6 +296,8 @@ private function shareUnshared(int $remoteAttendeeId, array $notification): arra $this->participantService->removeAttendee($room, $participant, AAttendeeRemovedEvent::REASON_REMOVED); $return = $this->fedInviteCountCache?->remove($invite->getUserId()); \OC::$server->getLogger()->error('$this->fedInviteCountCache->remove(): ' . json_encode([$invite->getUserId(), $return])); + $return = $this->fedInviteCountCache?->clear(); + \OC::$server->getLogger()->error('$this->fedInviteCountCache->clear(): ' . json_encode([$return])); } catch (ParticipantNotFoundException) { // Never accepted the invite }