From 352f1fcae231a1b0a21a0f7926efe0061592f410 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 16 Jan 2021 07:13:32 +0000 Subject: [PATCH] Hopefully make the tests happy --- include/api.php | 2 +- tests/datasets/api.fixture.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/api.php b/include/api.php index b649d22481..26a377821e 100644 --- a/include/api.php +++ b/include/api.php @@ -2041,7 +2041,7 @@ function api_statuses_repeat($type) Logger::log('API: api_statuses_repeat: '.$id); $fields = ['uri-id', 'network', 'body', 'title', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink']; - $item = Item::selectFirst($fields, ['id' => $id, 'private' => [Item::PUBLIC, Item::UNLISTED]]); + $item = Post::selectFirst($fields, ['id' => $id, 'private' => [Item::PUBLIC, Item::UNLISTED]]); if (DBA::isResult($item) && $item['body'] != "") { if (in_array($item['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::TWITTER])) { diff --git a/tests/datasets/api.fixture.php b/tests/datasets/api.fixture.php index ce7161e413..fcd1e6a6bb 100644 --- a/tests/datasets/api.fixture.php +++ b/tests/datasets/api.fixture.php @@ -187,6 +187,7 @@ return [ 'contact-id' => 42, 'author-id' => 42, 'owner-id' => 42, + 'causer-id' => 42, 'uid' => 42, 'verb' => 'http://activitystrea.ms/schema/1.0/post', 'unseen' => 1, @@ -210,6 +211,7 @@ return [ 'contact-id' => 42, 'author-id' => 42, 'owner-id' => 42, + 'causer-id' => 42, 'uid' => 42, 'verb' => 'http://activitystrea.ms/schema/1.0/post', 'unseen' => 0, @@ -230,6 +232,7 @@ return [ 'contact-id' => 43, 'author-id' => 43, 'owner-id' => 42, + 'causer-id' => 43, 'uid' => 42, 'verb' => 'http://activitystrea.ms/schema/1.0/post', 'unseen' => 0, @@ -249,6 +252,7 @@ return [ 'contact-id' => 44, 'author-id' => 44, 'owner-id' => 42, + 'causer-id' => 44, 'uid' => 42, 'verb' => 'http://activitystrea.ms/schema/1.0/post', 'unseen' => 0, @@ -269,6 +273,7 @@ return [ 'contact-id' => 42, 'author-id' => 42, 'owner-id' => 42, + 'causer-id' => 42, 'uid' => 42, 'verb' => 'http://activitystrea.ms/schema/1.0/post', 'unseen' => 0, @@ -292,6 +297,7 @@ return [ 'contact-id' => 44, 'author-id' => 44, 'owner-id' => 42, + 'causer-id' => 44, 'uid' => 42, 'verb' => 'http://activitystrea.ms/schema/1.0/post', 'unseen' => 0, @@ -332,6 +338,7 @@ return [ 'contact-id' => 42, 'author-id' => 42, 'owner-id' => 42, + 'causer-id' => 42, 'uid' => 42, 'wall' => 1, ], @@ -342,6 +349,7 @@ return [ 'contact-id' => 43, 'author-id' => 43, 'owner-id' => 43, + 'causer-id' => 43, 'uid' => 0, 'wall' => 1, ], @@ -352,6 +360,7 @@ return [ 'contact-id' => 44, 'author-id' => 44, 'owner-id' => 44, + 'causer-id' => 44, 'uid' => 0, 'wall' => 1, ],