diff --git a/app/Services/SearchApiV2Service.php b/app/Services/SearchApiV2Service.php index 93a29cae9..465bd98a4 100644 --- a/app/Services/SearchApiV2Service.php +++ b/app/Services/SearchApiV2Service.php @@ -96,9 +96,10 @@ class SearchApiV2Service $webfingerQuery = '@' . $webfingerQuery; } $banned = InstanceService::getBannedDomains(); + $operator = config('database.default') === 'pgsql' ? 'ilike' : 'like'; $results = Profile::select('username', 'id', 'followers_count', 'domain') - ->where('username', 'like', $query) - ->orWhere('webfinger', 'like', $webfingerQuery) + ->where('username', $operator, $query) + ->orWhere('webfinger', $operator, $webfingerQuery) ->orderByDesc('profiles.followers_count') ->offset($offset) ->limit($limit) @@ -160,23 +161,8 @@ class SearchApiV2Service protected function statusesById() { - $mastodonMode = self::$mastodonMode; - $accountId = $this->query->input('account_id'); - $limit = $this->query->input('limit', 20); - $query = '%' . $this->query->input('q') . '%'; - $results = Status::where('caption', 'like', $query) - ->whereProfileId($accountId) - ->limit($limit) - ->get() - ->map(function($status) use($mastodonMode) { - return $mastodonMode ? - StatusService::getMastodon($status->id) : - StatusService::get($status->id); - }) - ->filter(function($status) { - return $status && isset($status['account']); - }); - return $results; + // Removed until we provide more relevent sorting/results + return []; } protected function resolveQuery() diff --git a/public/js/spa.js b/public/js/spa.js index e5284288a..8c9b5e1b6 100644 Binary files a/public/js/spa.js and b/public/js/spa.js differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index adfaf1c36..7ce575355 100644 Binary files a/public/mix-manifest.json and b/public/mix-manifest.json differ diff --git a/storage/app/public/avatars/default.png b/storage/app/public/avatars/default.png index 80f467309..021958364 100644 Binary files a/storage/app/public/avatars/default.png and b/storage/app/public/avatars/default.png differ