notification.status format

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
pull/1635/head
Maxence Lange 2023-03-08 15:51:17 -01:00
rodzic fb3e07a863
commit 17e383471e
2 zmienionych plików z 11 dodań i 3 usunięć

Wyświetl plik

@ -420,8 +420,7 @@ class ApiController extends Controller {
ProbeOptions::ACCOUNT,
ProbeOptions::PUBLIC,
ProbeOptions::DIRECT,
ProbeOptions::FAVOURITES,
ProbeOptions::NOTIFICATIONS
ProbeOptions::FAVOURITES
]
)) {
throw new UnknownProbeException('unknown timeline');

Wyświetl plik

@ -604,11 +604,20 @@ class Stream extends ACore implements IQueryRow, JsonSerializable {
$type = '';
}
$status = null;
if ($statusPost = $this->getDetails('post')) {
if (!empty($statusPost)) {
$status = new Stream();
$status->importFromCache($statusPost);
$status->setExportFormat(self::FORMAT_LOCAL);
}
}
$result = [
'id' => $this->getId(),
'type' => $type,
'created_at' => $this->getOriginCreationTime(),
'status' => $this->getDetails('post'),
'status' => $status,
];
if ($this->hasActor()) {