Skip to content

Commit

Permalink
trying to clear
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Mar 27, 2024
1 parent 4c2ad46 commit e6cad37
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Controller/FederationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
4 changes: 4 additions & 0 deletions lib/Federation/CloudFederationProviderTalk.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit e6cad37

Please sign in to comment.