mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-20 11:35:29 +01:00
Fix account search with no query (#12549)
* Fix account search with no query Modeled after #12541. Fix #12548 * fix codeclimate
This commit is contained in:
parent
0465d2a3ce
commit
1653ae91ce
@ -4,8 +4,8 @@ class AccountSearchService < BaseService
|
|||||||
attr_reader :query, :limit, :offset, :options, :account
|
attr_reader :query, :limit, :offset, :options, :account
|
||||||
|
|
||||||
def call(query, account = nil, options = {})
|
def call(query, account = nil, options = {})
|
||||||
@acct_hint = query.start_with?('@')
|
@acct_hint = query&.start_with?('@')
|
||||||
@query = query.strip.gsub(/\A@/, '')
|
@query = query&.strip&.gsub(/\A@/, '')
|
||||||
@limit = options[:limit].to_i
|
@limit = options[:limit].to_i
|
||||||
@offset = options[:offset].to_i
|
@offset = options[:offset].to_i
|
||||||
@options = options
|
@options = options
|
||||||
|
Loading…
Reference in New Issue
Block a user