kopia lustrzana https://github.com/nextcloud/social
Merge pull request #1635 from nextcloud/fix/noid/status-format
notification.status formatpull/1636/head
commit
c3f41243a8
|
@ -420,8 +420,7 @@ class ApiController extends Controller {
|
||||||
ProbeOptions::ACCOUNT,
|
ProbeOptions::ACCOUNT,
|
||||||
ProbeOptions::PUBLIC,
|
ProbeOptions::PUBLIC,
|
||||||
ProbeOptions::DIRECT,
|
ProbeOptions::DIRECT,
|
||||||
ProbeOptions::FAVOURITES,
|
ProbeOptions::FAVOURITES
|
||||||
ProbeOptions::NOTIFICATIONS
|
|
||||||
]
|
]
|
||||||
)) {
|
)) {
|
||||||
throw new UnknownProbeException('unknown timeline');
|
throw new UnknownProbeException('unknown timeline');
|
||||||
|
|
|
@ -604,11 +604,20 @@ class Stream extends ACore implements IQueryRow, JsonSerializable {
|
||||||
$type = '';
|
$type = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$status = null;
|
||||||
|
if ($statusPost = $this->getDetails('post')) {
|
||||||
|
if (!empty($statusPost)) {
|
||||||
|
$status = new Stream();
|
||||||
|
$status->importFromCache($statusPost);
|
||||||
|
$status->setExportFormat(self::FORMAT_LOCAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$result = [
|
$result = [
|
||||||
'id' => $this->getId(),
|
'id' => $this->getId(),
|
||||||
'type' => $type,
|
'type' => $type,
|
||||||
'created_at' => $this->getOriginCreationTime(),
|
'created_at' => $this->getOriginCreationTime(),
|
||||||
'status' => $this->getDetails('post'),
|
'status' => $status,
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($this->hasActor()) {
|
if ($this->hasActor()) {
|
||||||
|
|
Ładowanie…
Reference in New Issue