Merge branch 'develop' into show_image_upload_limit

This commit is contained in:
Marek Bachmann 2022-11-30 02:28:15 +01:00
commit ca7af7a64b
4 changed files with 4 additions and 6 deletions

View file

@ -65,9 +65,8 @@ class FollowedTags extends BaseApi
$saved_searches = DBA::select('search', ['id', 'term'], $condition);
while ($saved_search = DBA::fetch($saved_searches)) {
self::setBoundaries($saved_search['id']);
$tag = ['name' => ltrim($saved_search['term'], '#')];
$hashtag = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, $tag, [], true);
$hashtag = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, ['name' => ltrim($saved_search['term'], '#')], [], true);
$return[] = $hashtag->toArray();
}

View file

@ -45,9 +45,8 @@ class Tags extends BaseApi
$tag = ltrim($this->parameters['hashtag'], '#');
$following = DBA::exists('search', ['uid' => $uid, 'term' => '#' . $tag]);
$term = ['term' => $tag];
$hashtag = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, $term, [], $following);
$hashtag = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, ['name' => $tag], [], $following);
System::jsonExit($hashtag->toArray());
}
}

View file

@ -45,7 +45,7 @@ class Follow extends BaseApi
DBA::insert('search', $fields);
}
$hashtag = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, $fields, [], true);
$hashtag = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, ['name' => ltrim($this->parameters['hashtag'])], [], true);
System::jsonExit($hashtag->toArray());
}
}

View file

@ -44,7 +44,7 @@ class Unfollow extends BaseApi
DBA::delete('search', $term);
$hashtag = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, $term, [], false);
$hashtag = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, ['name' => ltrim($this->parameters['hashtag'])], [], false);
System::jsonExit($hashtag->toArray());
}
}