Fix issue #11
This commit is contained in:
parent
370e2320a4
commit
2ef79cfad3
@ -58,12 +58,9 @@ class apActorLikedCollectionAction extends ManagedAction
|
|||||||
|
|
||||||
$fave = $this->fetch_faves ($user->getID(), $limit, $since_id, $max_id);
|
$fave = $this->fetch_faves ($user->getID(), $limit, $since_id, $max_id);
|
||||||
|
|
||||||
$total_faves = 0;
|
|
||||||
$faves = [];
|
$faves = [];
|
||||||
while ($fave->fetch()) {
|
while ($fave->fetch())
|
||||||
$faves[] = $this->pretty_fave (clone($fave));
|
$faves[] = $this->pretty_fave (clone($fave));
|
||||||
++$total_faves;
|
|
||||||
}
|
|
||||||
|
|
||||||
$res = [
|
$res = [
|
||||||
'@context' => [
|
'@context' => [
|
||||||
@ -74,7 +71,7 @@ class apActorLikedCollectionAction extends ManagedAction
|
|||||||
],
|
],
|
||||||
'id' => "{$url}/liked.json",
|
'id' => "{$url}/liked.json",
|
||||||
'type' => 'OrderedCollection',
|
'type' => 'OrderedCollection',
|
||||||
'totalItems' => $total_faves,
|
'totalItems' => Fave::countByProfile ($profile),
|
||||||
'orderedItems' => $faves
|
'orderedItems' => $faves
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -62,7 +62,6 @@ class Activitypub_notice extends Managed_DataObject
|
|||||||
"{$notice->getProfile()->getUrl()}/subscribers",
|
"{$notice->getProfile()->getUrl()}/subscribers",
|
||||||
],
|
],
|
||||||
'content' => $notice->getContent(),
|
'content' => $notice->getContent(),
|
||||||
'rendered' => $notice->getRendered(),
|
|
||||||
'url' => $notice->getUrl(),
|
'url' => $notice->getUrl(),
|
||||||
'reply_to' => empty($notice->reply_to) ? null : Notice::getById($notice->reply_to)->getUrl(),
|
'reply_to' => empty($notice->reply_to) ? null : Notice::getById($notice->reply_to)->getUrl(),
|
||||||
'is_local' => $notice->isLocal(),
|
'is_local' => $notice->isLocal(),
|
||||||
|
Reference in New Issue
Block a user