diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2023-03-08 16:08:33 -0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-08 16:08:33 -0100 |
commit | c3f41243a8e20ea77931d34d0eda566c9eaa258c (patch) | |
tree | e745722ba1193d9411c7f466740e1ff354684a35 | |
parent | 1118bbc7a01db4e999e1497e9893a25b663b8caf (diff) | |
parent | 17e383471e4a486e94e90b0b537464e06b890b64 (diff) |
Merge pull request #1635 from nextcloud/fix/noid/status-format
notification.status format
-rw-r--r-- | lib/Controller/ApiController.php | 3 | ||||
-rw-r--r-- | lib/Model/ActivityPub/Stream.php | 11 |
2 files changed, 11 insertions, 3 deletions
diff --git a/lib/Controller/ApiController.php b/lib/Controller/ApiController.php index 3f680726..2cd6c18a 100644 --- a/lib/Controller/ApiController.php +++ b/lib/Controller/ApiController.php @@ -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'); diff --git a/lib/Model/ActivityPub/Stream.php b/lib/Model/ActivityPub/Stream.php index b540cd42..29ce3973 100644 --- a/lib/Model/ActivityPub/Stream.php +++ b/lib/Model/ActivityPub/Stream.php @@ -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()) { |