From bda28640d6e066ae338c6f31407df274ed09f026 Mon Sep 17 00:00:00 2001 From: winter Date: Sun, 8 Dec 2024 23:18:35 +0000 Subject: implement remote object fetching! this is most of the tricky parts of inbound federation :3 --- WpfTest/Model/ActorEndpoints.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'WpfTest/Model/ActorEndpoints.php') diff --git a/WpfTest/Model/ActorEndpoints.php b/WpfTest/Model/ActorEndpoints.php index 03dab9e..f6120d3 100644 --- a/WpfTest/Model/ActorEndpoints.php +++ b/WpfTest/Model/ActorEndpoints.php @@ -4,6 +4,7 @@ namespace WpfTest\Model; use WpfTest\Model; class ActorEndpoints extends Model { + public ?int $actorId; public string $basicFeed; public ?string $fullFeed; public ?string $follow; @@ -12,4 +13,15 @@ class ActorEndpoints extends Model { public ?string $unblock; public ?string $subscribe; public ?string $unsubscribe; + + protected function setOwnerId(int $id) { + $this->actorId = $id; + } + + protected function getUpdateWhereClause($db): ?string { + if (self::findWhere('actor_id = ?', [$this->actorId]) != null) { + return "actor_id = $this->actorId"; + } + return null; + } } \ No newline at end of file -- cgit v1.3