AOI: Send "history" section for trends

This commit is contained in:
Michael 2021-06-24 22:15:25 +00:00
parent 9cd642abbc
commit e6e90abc77
2 changed files with 8 additions and 4 deletions

View file

@ -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();
}