aboutsummaryrefslogtreecommitdiffhomepage
path: root/WpfTest/Model/ActorEndpoints.php
diff options
context:
space:
mode:
authorwinter2024-12-08 23:18:35 +0000
committerwinter2024-12-08 23:18:35 +0000
commitbda28640d6e066ae338c6f31407df274ed09f026 (patch)
tree2a887dd4f98f79fc11efefc9585c58e144f66a00 /WpfTest/Model/ActorEndpoints.php
parentb00185ddbac9ac3de975a3954f2ede2f24458f6a (diff)
implement remote object fetching!
this is most of the tricky parts of inbound federation :3
Diffstat (limited to 'WpfTest/Model/ActorEndpoints.php')
-rw-r--r--WpfTest/Model/ActorEndpoints.php12
1 files changed, 12 insertions, 0 deletions
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