Merge pull request #12560 from HankG/mastodon-api-tag-names-with-case

Make tag 'Names' Field have case-sensitive version
This commit is contained in:
Hypolite Petovan 2022-12-28 17:30:23 -05:00 committed by GitHub
commit 26db8a71b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,8 +51,8 @@ class Tag extends BaseDataTransferObject
*/
public function __construct(BaseURL $baseUrl, array $tag, array $history = [], bool $following = false)
{
$this->name = strtolower($tag['name']);
$this->url = $baseUrl . '/search?tag=' . urlencode($this->name);
$this->name = $tag['name'];
$this->url = $baseUrl . '/search?tag=' . urlencode(strtolower($this->name));
$this->history = $history;
$this->following = $following;
}