mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-24 05:53:17 +00:00
commit
b34d97d6b7
2 changed files with 12 additions and 1 deletions
|
@ -85,6 +85,7 @@
|
|||
- Updated ApiV1Controller, fix illegal operator bug by setting default min_id. ([415826f2](https://github.com/pixelfed/pixelfed/commit/415826f2))
|
||||
- Updated StatusService, add getMastodon method for mastoapi compatibility. ([36a129fe](https://github.com/pixelfed/pixelfed/commit/36a129fe))
|
||||
- Updated PublicApiController, fix accountStatuses pagination operator. ([85fc9dd0](https://github.com/pixelfed/pixelfed/commit/85fc9dd0))
|
||||
- Updated PublicApiController, enforce only_media on accountStatuses method. Fixes #3105. ([861a2d36](https://github.com/pixelfed/pixelfed/commit/861a2d36))
|
||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||
|
||||
## [v0.11.1 (2021-09-07)](https://github.com/pixelfed/pixelfed/compare/v0.11.0...v0.11.1)
|
||||
|
|
|
@ -737,6 +737,7 @@ class PublicApiController extends Controller
|
|||
$max_id = $request->max_id;
|
||||
$min_id = $request->min_id;
|
||||
$scope = ['photo', 'photo:album', 'video', 'video:album'];
|
||||
$onlyMedia = $request->input('only_media', true);
|
||||
|
||||
if(!$min_id && !$max_id) {
|
||||
$min_id = 1;
|
||||
|
@ -787,7 +788,16 @@ class PublicApiController extends Controller
|
|||
}
|
||||
return $status;
|
||||
})
|
||||
->filter(function($s) {
|
||||
->filter(function($s) use($onlyMedia) {
|
||||
if($onlyMedia) {
|
||||
if(
|
||||
!isset($s['media_attachments']) ||
|
||||
!is_array($s['media_attachments']) ||
|
||||
empty($s['media_attachments'])
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return $s;
|
||||
})
|
||||
->values();
|
||||
|
|
Loading…
Reference in a new issue