This commit is contained in:
Diogo Cordeiro 2018-05-13 15:07:02 +01:00
parent 370e2320a4
commit 2ef79cfad3
2 changed files with 2 additions and 6 deletions

View File

@ -58,12 +58,9 @@ class apActorLikedCollectionAction extends ManagedAction
$fave = $this->fetch_faves ($user->getID(), $limit, $since_id, $max_id);
$total_faves = 0;
$faves = [];
while ($fave->fetch()) {
while ($fave->fetch())
$faves[] = $this->pretty_fave (clone($fave));
++$total_faves;
}
$res = [
'@context' => [
@ -74,7 +71,7 @@ class apActorLikedCollectionAction extends ManagedAction
],
'id' => "{$url}/liked.json",
'type' => 'OrderedCollection',
'totalItems' => $total_faves,
'totalItems' => Fave::countByProfile ($profile),
'orderedItems' => $faves
];

View File

@ -62,7 +62,6 @@ class Activitypub_notice extends Managed_DataObject
"{$notice->getProfile()->getUrl()}/subscribers",
],
'content' => $notice->getContent(),
'rendered' => $notice->getRendered(),
'url' => $notice->getUrl(),
'reply_to' => empty($notice->reply_to) ? null : Notice::getById($notice->reply_to)->getUrl(),
'is_local' => $notice->isLocal(),