diff --git a/src/Module/Api/Mastodon/Search.php b/src/Module/Api/Mastodon/Search.php index 0306777117..96d41c3b2e 100644 --- a/src/Module/Api/Mastodon/Search.php +++ b/src/Module/Api/Mastodon/Search.php @@ -108,8 +108,7 @@ class Search extends BaseApi */ private static function searchAccounts(int $uid, string $q, bool $resolve, int $limit, int $offset, bool $following) { - if ( - ($offset == 0) && (strrpos($q, '@') > 0 || Network::isValidHttpUrl($q)) + if (($offset == 0) && (strrpos($q, '@') > 0 || Network::isValidHttpUrl($q)) && $id = Contact::getIdForURL($q, 0, $resolve ? null : false) ) { return DI::mstdnAccount()->createFromContactId($id, $uid);