From 9d60db5a63b69ccea1e25871d4fb5b2e62e0cb59 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 20 Mar 2026 05:49:39 -0600 Subject: [PATCH] Update SearchApiV2Service --- app/Services/SearchApiV2Service.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Services/SearchApiV2Service.php b/app/Services/SearchApiV2Service.php index 58bac54ac..8103518af 100644 --- a/app/Services/SearchApiV2Service.php +++ b/app/Services/SearchApiV2Service.php @@ -236,11 +236,16 @@ class SearchApiV2Service return $this->resolveLocalProfile(); } } else { - if (! Helpers::validateUrl($query) && strpos($query, '@') == -1) { + if (! Helpers::validateUrl($query) && strpos($query, '@') === false) { return $default; } - if (! Str::startsWith($query, 'http') && Str::substrCount($query, '@') == 1 && strpos($query, '@') !== 0) { + if ( + ! Str::startsWith($query, 'http') && + Str::substrCount($query, '@') == 1 && + strpos($query, '@') !== false && + strpos($query, '@') !== 0 + ) { try { $res = WebfingerService::lookup('@'.$query, $mastodonMode); } catch (\Exception $e) {