Update ApiV1Controller, filter conversations without last_status

This commit is contained in:
Daniel Supernault 2023-02-10 02:02:07 -07:00
parent 29b1af100c
commit e8a6a8c71e
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -2335,7 +2335,7 @@ class ApiV1Controller extends Controller
return $res; return $res;
}) })
->filter(function($dm) { ->filter(function($dm) {
return isset($dm['accounts']) && count($dm['accounts']); return isset($dm['accounts']) && count($dm['accounts']) && !empty($dm['last_status']);
}) })
->unique(function($item, $key) { ->unique(function($item, $key) {
return $item['accounts'][0]['id']; return $item['accounts'][0]['id'];