mirror of
https://github.com/friendica/friendica
synced 2025-04-24 12:30:10 +00:00
AOI: Send "history" section for trends
This commit is contained in:
parent
9cd642abbc
commit
e6e90abc77
2 changed files with 8 additions and 4 deletions
|
@ -45,7 +45,8 @@ class Trends extends BaseApi
|
|||
$tags = Tag::getGlobalTrendingHashtags(24, 20);
|
||||
foreach ($tags as $tag) {
|
||||
$tag['name'] = $tag['term'];
|
||||
$hashtag = new \Friendica\Object\Api\Mastodon\Tag(DI::baseUrl(), $tag);
|
||||
$history = [['day' => (string)time(), 'uses' => (string)$tag['score'], 'accounts' => (string)$tag['authors']]];
|
||||
$hashtag = new \Friendica\Object\Api\Mastodon\Tag(DI::baseUrl(), $tag, $history);
|
||||
$trending[] = $hashtag->toArray();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue