mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-02 02:13:17 +00:00
commit
af5bc07557
2 changed files with 8 additions and 3 deletions
|
@ -116,6 +116,7 @@
|
||||||
- Update mute/block logic with admin defined limits and improved filtering to skip deleted accounts ([5b879f01](https://github.com/pixelfed/pixelfed/commit/5b879f01))
|
- Update mute/block logic with admin defined limits and improved filtering to skip deleted accounts ([5b879f01](https://github.com/pixelfed/pixelfed/commit/5b879f01))
|
||||||
- Update FollowPipeline, fix followers_count and following_count counters ([6153b620](https://github.com/pixelfed/pixelfed/commit/6153b620))
|
- Update FollowPipeline, fix followers_count and following_count counters ([6153b620](https://github.com/pixelfed/pixelfed/commit/6153b620))
|
||||||
- Update ApiV1Controller, fix media update. Fixes #4196 ([f3164650](https://github.com/pixelfed/pixelfed/commit/f3164650))
|
- Update ApiV1Controller, fix media update. Fixes #4196 ([f3164650](https://github.com/pixelfed/pixelfed/commit/f3164650))
|
||||||
|
- Update SearchApiV2Service, fix hashtag search. ([1992b5bc](https://github.com/pixelfed/pixelfed/commit/1992b5bc))
|
||||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||||
|
|
||||||
## [v0.11.4 (2022-10-04)](https://github.com/pixelfed/pixelfed/compare/v0.11.3...v0.11.4)
|
## [v0.11.4 (2022-10-04)](https://github.com/pixelfed/pixelfed/compare/v0.11.3...v0.11.4)
|
||||||
|
|
|
@ -122,11 +122,15 @@ class SearchApiV2Service
|
||||||
protected function hashtags()
|
protected function hashtags()
|
||||||
{
|
{
|
||||||
$mastodonMode = self::$mastodonMode;
|
$mastodonMode = self::$mastodonMode;
|
||||||
|
$q = $this->query->input('q');
|
||||||
$limit = $this->query->input('limit') ?? 20;
|
$limit = $this->query->input('limit') ?? 20;
|
||||||
$offset = $this->query->input('offset') ?? 0;
|
$offset = $this->query->input('offset') ?? 0;
|
||||||
$query = $this->query->input('q') . '%';
|
$query = Str::startsWith($q, '#') ? substr($q, 1) . '%' : $q . '%';
|
||||||
return Hashtag::where('can_search', true)
|
return Hashtag::where('name', 'like', $query)
|
||||||
->where('name', 'like', $query)
|
->where(function($q) {
|
||||||
|
return $q->where('can_search', true)
|
||||||
|
->orWhereNull('can_search');
|
||||||
|
})
|
||||||
->offset($offset)
|
->offset($offset)
|
||||||
->limit($limit)
|
->limit($limit)
|
||||||
->get()
|
->get()
|
||||||
|
|
Loading…
Reference in a new issue