*/
public static function rawContent(array $parameters = [])
{
- self::login(self::SCOPE_READ);
+ self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();
if (empty($parameters['id'])) {
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
$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);
array_reverse($accounts);
}
+ self::setLinkHeader();
System::jsonExit($accounts);
}
}