mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-25 15:55:22 +00:00
Update ApiV1Controller, update Notifications endpoint to filter notifications with missing activities
This commit is contained in:
parent
3f0539978e
commit
a933615b8d
1 changed files with 8 additions and 0 deletions
|
@ -2298,6 +2298,14 @@ class ApiV1Controller extends Controller
|
|||
$minId = null;
|
||||
}
|
||||
|
||||
$res = collect($res)->filter(function($n) {
|
||||
if(in_array($n['type'], ['mention', 'reblog', 'favourite'])) {
|
||||
return isset($n['status'], $n['status']['id']);
|
||||
}
|
||||
|
||||
return isset($n['account'], $n['account']['id']);
|
||||
})->values();
|
||||
|
||||
if($maxId) {
|
||||
$link = '<'.$baseUrl.'max_id='.$minId.'>; rel="next"';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue