mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-23 15:01:27 +00:00
commit
535a0e63ab
3 changed files with 14 additions and 2 deletions
|
@ -90,6 +90,8 @@
|
|||
- Updated AccountController, refresh RelationshipService on mute/block. ([6f1b0245](https://github.com/pixelfed/pixelfed/commit/6f1b0245))
|
||||
- Updated ApiV1Controller, fix version on instance endpoint. ([a6261221](https://github.com/pixelfed/pixelfed/commit/a6261221))
|
||||
- Updated components, fix api endpoints. Fixes #3138. ([e724633e](https://github.com/pixelfed/pixelfed/commit/e724633e))
|
||||
- Updated ApiV1Controller, fix public timeline endpoint. ([80c7def3](https://github.com/pixelfed/pixelfed/commit/80c7def3))
|
||||
- Updated PublicApiController, fix public timeline endpoint. ([dcb7ba9c](https://github.com/pixelfed/pixelfed/commit/dcb7ba9c))
|
||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||
|
||||
## [v0.11.1 (2021-09-07)](https://github.com/pixelfed/pixelfed/compare/v0.11.0...v0.11.1)
|
||||
|
|
|
@ -1794,6 +1794,10 @@ class ApiV1Controller extends Controller
|
|||
$res = collect($feed)
|
||||
->map(function($k) use($user) {
|
||||
$status = StatusService::getMastodon($k);
|
||||
if(!$status || !isset($status['account']) || !isset($status['account']['id'])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if($user) {
|
||||
$status['favourited'] = (bool) LikeService::liked($user->profile_id, $k);
|
||||
$status['relationship'] = RelationshipService::get($user->profile_id, $status['account']['id']);
|
||||
|
@ -1801,8 +1805,9 @@ class ApiV1Controller extends Controller
|
|||
return $status;
|
||||
})
|
||||
->filter(function($s) use($filtered) {
|
||||
return in_array($s['account']['id'], $filtered) == false;
|
||||
return $s && isset($s['account']) && in_array($s['account']['id'], $filtered) == false;
|
||||
})
|
||||
->values()
|
||||
->toArray();
|
||||
return response()->json($res);
|
||||
}
|
||||
|
|
|
@ -323,6 +323,9 @@ class PublicApiController extends Controller
|
|||
->get()
|
||||
->map(function($s) use ($user) {
|
||||
$status = StatusService::getFull($s->id, $user->profile_id);
|
||||
if(!$status) {
|
||||
return false;
|
||||
}
|
||||
$status['favourited'] = (bool) LikeService::liked($user->profile_id, $s->id);
|
||||
return $status;
|
||||
})
|
||||
|
@ -362,6 +365,9 @@ class PublicApiController extends Controller
|
|||
->get()
|
||||
->map(function($s) use ($user) {
|
||||
$status = StatusService::getFull($s->id, $user->profile_id);
|
||||
if(!$status) {
|
||||
return false;
|
||||
}
|
||||
$status['favourited'] = (bool) LikeService::liked($user->profile_id, $s->id);
|
||||
return $status;
|
||||
})
|
||||
|
@ -777,7 +783,6 @@ class PublicApiController extends Controller
|
|||
$visibility = ['public', 'unlisted'];
|
||||
}
|
||||
}
|
||||
|
||||
$dir = $min_id ? '>' : '<';
|
||||
$id = $min_id ?? $max_id;
|
||||
$res = Status::whereProfileId($profile['id'])
|
||||
|
|
Loading…
Reference in a new issue