Merge remote-tracking branch 'tootsuite/master' into merge-upstream
This commit is contained in:
@@ -4,7 +4,7 @@ class AccountSearchService < BaseService
|
||||
attr_reader :query, :limit, :options, :account
|
||||
|
||||
def call(query, limit, account = nil, options = {})
|
||||
@query = query
|
||||
@query = query.strip
|
||||
@limit = limit
|
||||
@options = options
|
||||
@account = account
|
||||
|
||||
@@ -38,7 +38,7 @@ class FetchLinkCardService < BaseService
|
||||
@card ||= PreviewCard.new(url: @url)
|
||||
res = Request.new(:head, @url).perform
|
||||
|
||||
return if res.code != 200 || res.mime_type != 'text/html'
|
||||
return if res.code != 405 && (res.code != 200 || res.mime_type != 'text/html')
|
||||
|
||||
attempt_oembed || attempt_opengraph
|
||||
end
|
||||
|
||||
@@ -44,7 +44,7 @@ class ResolveRemoteAccountService < BaseService
|
||||
if lock.acquired?
|
||||
@account = Account.find_remote(@username, @domain)
|
||||
|
||||
if activitypub_ready?
|
||||
if activitypub_ready? || @account&.activitypub?
|
||||
handle_activitypub
|
||||
else
|
||||
handle_ostatus
|
||||
|
||||
Reference in New Issue
Block a user