Update ApiV1Controller, update Notifications endpoint to filter notifications with missing activities

pull/4973/head
Daniel Supernault 2024-03-05 00:39:50 -07:00
rodzic 3f0539978e
commit a933615b8d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 23740873EE6F76A1
1 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -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"';
}