From aafbcc8fc1a07872fffa4d669117f41148e509a8 Mon Sep 17 00:00:00 2001 From: winter Date: Mon, 23 Dec 2024 22:26:46 +0000 Subject: rename "user" to actor and "post" to note everywhere --- Digitigrade/Model/Actor.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'Digitigrade/Model/Actor.php') diff --git a/Digitigrade/Model/Actor.php b/Digitigrade/Model/Actor.php index d3589ae..3ad0efe 100644 --- a/Digitigrade/Model/Actor.php +++ b/Digitigrade/Model/Actor.php @@ -41,12 +41,12 @@ class Actor extends PushableModel implements RpcReceiver { throw new \RuntimeException('an actor with that local handle already exists!'); } $actor = new self(); - $actor->uri = path_to_uri("/user/$handle"); + $actor->uri = path_to_uri("/actor/$handle"); $actor->isLocal = true; $date = new \DateTimeImmutable(); $actor->created = $date; $actor->modified = $date; - // don't really need to set this as it's generated by the view at /user/:handle + // don't really need to set this as it's generated by the view at /actor/:handle $actor->homepage = path_to_uri("/@/$handle"); $actor->handle = $handle; $actor->displayName = $displayName ?? $handle; @@ -56,7 +56,7 @@ class Actor extends PushableModel implements RpcReceiver { // don't actually need to set these either // just need to set the basicFeed since it's a required field $actor->endpoints = new ActorEndpoints(); - $actor->endpoints->basicFeed = path_to_uri("/user/$handle/basicFeed"); + $actor->endpoints->basicFeed = path_to_uri("/actor/$handle/basicFeed"); $actor->save(); return $actor; } @@ -212,13 +212,13 @@ class Actor extends PushableModel implements RpcReceiver { if ($this->deleted) { return [ 'type' => 'tombstone', - 'self' => path_to_uri("/user/$this->handle"), + 'self' => path_to_uri("/actor/$this->handle"), 'previousType' => 'actor' ]; } return [ 'type' => 'actor', - 'self' => path_to_uri("/user/$this->handle"), + 'self' => path_to_uri("/actor/$this->handle"), 'created' => $this->created?->format('c'), 'modified' => $this->modified?->format('c'), 'homepage' => path_to_uri("/@/$this->handle"), @@ -230,12 +230,12 @@ class Actor extends PushableModel implements RpcReceiver { 'automated' => $this->automated, 'requestToFollow' => $this->requestToFollow, 'endpoints' => [ - 'basicFeed' => path_to_uri("/user/$this->handle/basicFeed"), - 'fullFeed' => path_to_uri("/user/$this->handle/fullFeed"), - 'follow' => path_to_uri("/user/$this->handle/follow"), - 'unfollow' => path_to_uri("/user/$this->handle/unfollow"), - 'acceptedFollow' => path_to_uri("/user/$this->handle/acceptedFollow"), - 'rejectedFollow' => path_to_uri("/user/$this->handle/rejectedFollow"), + 'basicFeed' => path_to_uri("/actor/$this->handle/basicFeed"), + 'fullFeed' => path_to_uri("/actor/$this->handle/fullFeed"), + 'follow' => path_to_uri("/actor/$this->handle/follow"), + 'unfollow' => path_to_uri("/actor/$this->handle/unfollow"), + 'acceptedFollow' => path_to_uri("/actor/$this->handle/acceptedFollow"), + 'rejectedFollow' => path_to_uri("/actor/$this->handle/rejectedFollow"), ] ]; } -- cgit v1.3