diff --git a/lib/Listeners/AccountUpdated.php b/lib/Listeners/AccountUpdated.php index af8f09ee9..2a2b930db 100644 --- a/lib/Listeners/AccountUpdated.php +++ b/lib/Listeners/AccountUpdated.php @@ -31,6 +31,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; @@ -49,7 +50,8 @@ public function __construct( private CircleService $circleService, private FederatedEventService $federatedEventService, private FederatedUserService $federatedUserService, - private LoggerInterface $logger + private LoggerInterface $logger, + private MemberRequest $memberRequest ) { } @@ -66,6 +68,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);