diff --git a/lib/Listeners/AccountUpdated.php b/lib/Listeners/AccountUpdated.php index d1ffccc1e..c74ef7162 100644 --- a/lib/Listeners/AccountUpdated.php +++ b/lib/Listeners/AccountUpdated.php @@ -11,6 +11,7 @@ use Exception; use OCA\Circles\Db\CircleRequest; +use OCA\Circles\Db\MemberRequest; use OCA\Circles\FederatedItems\MemberDisplayName; use OCA\Circles\Model\Federated\FederatedEvent; use OCA\Circles\Model\Probes\CircleProbe; @@ -30,7 +31,8 @@ public function __construct( private CircleService $circleService, private FederatedEventService $federatedEventService, private FederatedUserService $federatedUserService, - private LoggerInterface $logger + private LoggerInterface $logger, + private MemberRequest $memberRequest ) { } @@ -47,6 +49,7 @@ public function handle(Event $event): void { $user = $event->getUser(); $federatedUser = $this->federatedUserService->getLocalFederatedUser($user->getUID()); + $this->memberRequest->updateDisplayName($federatedUser->getSingleId(), $user->getDisplayName()); $this->circleRequest->updateDisplayName($federatedUser->getSingleId(), $user->getDisplayName()); $this->federatedUserService->setCurrentUser($federatedUser);