diff options
Diffstat (limited to 'Digitigrade/Model')
| -rw-r--r-- | Digitigrade/Model/Actor.php | 22 | ||||
| -rw-r--r-- | Digitigrade/Model/Note.php | 6 |
2 files changed, 14 insertions, 14 deletions
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"), ] ]; } diff --git a/Digitigrade/Model/Note.php b/Digitigrade/Model/Note.php index 105f475..37ddff3 100644 --- a/Digitigrade/Model/Note.php +++ b/Digitigrade/Model/Note.php @@ -59,7 +59,7 @@ class Note extends PushableModel { $note->privacy->indexable = $indexable; $note->save(); - $note->uri = path_to_uri("/post/$note->id"); + $note->uri = path_to_uri("/note/$note->id"); $note->save(); return $note; @@ -137,13 +137,13 @@ class Note extends PushableModel { if ($this->deleted) { return [ 'type' => 'tombstone', - 'self' => path_to_uri("/post/$this->id"), + 'self' => path_to_uri("/note/$this->id"), 'previousType' => 'note' ]; } return [ 'type' => 'note', - 'self' => path_to_uri("/post/$this->id"), + 'self' => path_to_uri("/note/$this->id"), 'created' => $this->created->format('c'), 'modified' => $this->modified?->format('c'), 'author' => $this->author->uri, |
