Change Model type to `OrderedCollectionPage`

Use type `OrderedCollectionPage` instead of `OrderedCollection` in pages or distinct subsets
FYI: https://www.w3.org/TR/activitystreams-core/#h-paging
This commit is contained in:
kPherox 2019-08-29 11:12:01 +09:00
parent d1e1cb2172
commit 0da36b839c
No known key found for this signature in database
GPG Key ID: C04751C2BFA2F62D
1 changed files with 3 additions and 0 deletions

View File

@ -71,6 +71,7 @@ class Transmitter
if (empty($page)) {
$data['first'] = System::baseUrl() . '/followers/' . $owner['nickname'] . '?page=1';
} else {
$data['type'] = 'OrderedCollectionPage';
$list = [];
$contacts = DBA::select('contact', ['url'], $condition, ['limit' => [($page - 1) * 100, 100]]);
@ -119,6 +120,7 @@ class Transmitter
if (empty($page)) {
$data['first'] = System::baseUrl() . '/following/' . $owner['nickname'] . '?page=1';
} else {
$data['type'] = 'OrderedCollectionPage';
$list = [];
$contacts = DBA::select('contact', ['url'], $condition, ['limit' => [($page - 1) * 100, 100]]);
@ -165,6 +167,7 @@ class Transmitter
if (empty($page)) {
$data['first'] = System::baseUrl() . '/outbox/' . $owner['nickname'] . '?page=1';
} else {
$data['type'] = 'OrderedCollectionPage';
$list = [];
$condition['parent-network'] = Protocol::NATIVE_SUPPORT;