|
|
|
@ -87,7 +87,7 @@ class SearchApiV2Service
|
|
|
|
|
$limit = $this->query->input('limit') ?? 20;
|
|
|
|
|
$offset = $this->query->input('offset') ?? 0;
|
|
|
|
|
$rawQuery = $initalQuery ? $initalQuery : $this->query->input('q');
|
|
|
|
|
$query = '%' . $rawQuery . '%';
|
|
|
|
|
$query = $rawQuery . '%';
|
|
|
|
|
if(Str::substrCount($rawQuery, '@') >= 1 && Str::contains($rawQuery, config('pixelfed.domain.app'))) {
|
|
|
|
|
$deliminatorCount = Str::substrCount($rawQuery, '@');
|
|
|
|
|
$query = explode('@', $rawQuery)[$deliminatorCount == 1 ? 0 : 1];
|
|
|
|
@ -123,7 +123,7 @@ class SearchApiV2Service
|
|
|
|
|
$mastodonMode = self::$mastodonMode;
|
|
|
|
|
$limit = $this->query->input('limit') ?? 20;
|
|
|
|
|
$offset = $this->query->input('offset') ?? 0;
|
|
|
|
|
$query = '%' . $this->query->input('q') . '%';
|
|
|
|
|
$query = $this->query->input('q') . '%';
|
|
|
|
|
return Hashtag::where('can_search', true)
|
|
|
|
|
->where('name', 'like', $query)
|
|
|
|
|
->offset($offset)
|
|
|
|
|