]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Api/Mastodon/Blocks.php
Merge pull request #10600 from nupplaphil/bug/update_autoinstall_doc
[friendica.git] / src / Module / Api / Mastodon / Blocks.php
index d92b6059d3b3abd81a6dd55db0ca3a5dae54e11d..305914c1aadca10a1846bd99e54fddc50b1d8af2 100644 (file)
@@ -49,8 +49,6 @@ class Blocks extends BaseApi
                        DI::mstdnError()->RecordNotFound();
                }
 
-               // @todo provide HTTP link header
-
                $request = self::getRequest([
                        'max_id'   => 0,  // Return results older than this id
                        'since_id' => 0,  // Return results newer than this id
@@ -77,6 +75,7 @@ class Blocks extends BaseApi
 
                $followers = DBA::select('user-contact', ['cid'], $condition, $parameters);
                while ($follower = DBA::fetch($followers)) {
+                       self::setBoundaries($follower['cid']);
                        $accounts[] = DI::mstdnAccount()->createFromContactId($follower['cid'], $uid);
                }
                DBA::close($followers);
@@ -85,6 +84,7 @@ class Blocks extends BaseApi
                        array_reverse($accounts);
                }
 
+               self::setLinkHeader();
                System::jsonExit($accounts);
        }
 }