mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-23 23:11:27 +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 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 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, 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/))
|
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||||
|
|
||||||
## [v0.11.1 (2021-09-07)](https://github.com/pixelfed/pixelfed/compare/v0.11.0...v0.11.1)
|
## [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;
|
$max_id = $request->max_id;
|
||||||
$min_id = $request->min_id;
|
$min_id = $request->min_id;
|
||||||
$scope = ['photo', 'photo:album', 'video', 'video:album'];
|
$scope = ['photo', 'photo:album', 'video', 'video:album'];
|
||||||
|
$onlyMedia = $request->input('only_media', true);
|
||||||
|
|
||||||
if(!$min_id && !$max_id) {
|
if(!$min_id && !$max_id) {
|
||||||
$min_id = 1;
|
$min_id = 1;
|
||||||
|
@ -787,7 +788,16 @@ class PublicApiController extends Controller
|
||||||
}
|
}
|
||||||
return $status;
|
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;
|
return $s;
|
||||||
})
|
})
|
||||||
->values();
|
->values();
|
||||||
|
|
Loading…
Reference in a new issue