summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2023-06-13 21:14:12 -0100
committerGitHub <noreply@github.com>2023-06-13 21:14:12 -0100
commit28e64fb04b4283dbd0b4e5dba743d24f3010648e (patch)
tree16c026feae6f2406d93be655fde7e1668f066e8d
parent18790fb91484d77599285ee5510e2d7d50d140c9 (diff)
parent87264d44bd388882f66a4009aaa2f0a05e6bfdf8 (diff)
Merge pull request #1779 from nextcloud/fix/noid/update-displayname-only-when-needed
update details only
-rw-r--r--lib/Service/AccountService.php4
-rw-r--r--lib/Service/ActorService.php10
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/Service/AccountService.php b/lib/Service/AccountService.php
index a462962b..1fbfed90 100644
--- a/lib/Service/AccountService.php
+++ b/lib/Service/AccountService.php
@@ -318,7 +318,7 @@ class AccountService {
}
$this->addLocalActorDetailCount($actor);
- $this->actorService->cacheLocalActor($actor);
+ $this->actorService->cacheLocalActorDetails($actor);
}
@@ -348,7 +348,7 @@ class AccountService {
*
* @throws NoUserException
*/
- private function updateCacheLocalActorName(Person &$actor) {
+ private function updateCacheLocalActorName(Person $actor) {
$user = $this->userManager->get($actor->getUserId());
if ($user === null) {
throw new NoUserException();
diff --git a/lib/Service/ActorService.php b/lib/Service/ActorService.php
index 17cad663..3a84f27c 100644
--- a/lib/Service/ActorService.php
+++ b/lib/Service/ActorService.php
@@ -106,6 +106,16 @@ class ActorService {
*
* @throws ItemAlreadyExistsException
*/
+ public function cacheLocalActorDetails(Person $actor) {
+ $this->cacheActorsRequest->updateDetails($actor);
+ }
+
+
+ /**
+ * @param Person $actor
+ *
+ * @throws ItemAlreadyExistsException
+ */
public function save(Person $actor) {
$this->cacheDocumentIfNeeded($actor);
$this->cacheActorsRequest->save($actor);