Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `CONTRIBUTING.md`: Not a real conflict, glitch-soc quotes the upstream file, which has been changed. Update the quote.
This commit is contained in:
@@ -175,7 +175,7 @@ class AccountSearchService < BaseService
|
||||
end
|
||||
|
||||
def username_complete?
|
||||
query.include?('@') && "@#{query}" =~ /\A#{Account::MENTION_RE}\Z/
|
||||
query.include?('@') && "@#{query}".match?(/\A#{Account::MENTION_RE}\Z/)
|
||||
end
|
||||
|
||||
def likely_acct?
|
||||
|
@@ -23,11 +23,8 @@ class ActivityPub::FetchFeaturedCollectionService < BaseService
|
||||
|
||||
def process_items(items)
|
||||
status_ids = items.map { |item| value_or_id(item) }
|
||||
.reject { |uri| ActivityPub::TagManager.instance.local_uri?(uri) }
|
||||
.filter_map { |uri| ActivityPub::FetchRemoteStatusService.new.call(uri) }
|
||||
.select { |status| status.account_id == @account.id }
|
||||
.map(&:id)
|
||||
|
||||
.filter_map { |uri| ActivityPub::FetchRemoteStatusService.new.call(uri) unless ActivityPub::TagManager.instance.local_uri?(uri) }
|
||||
.filter_map { |status| status.id if status.account_id == @account.id }
|
||||
to_remove = []
|
||||
to_add = status_ids
|
||||
|
||||
|
@@ -47,11 +47,11 @@ class FetchLinkCardService < BaseService
|
||||
|
||||
Request.new(:get, @url).add_headers('Accept' => 'text/html', 'User-Agent' => Mastodon::Version.user_agent + ' Bot').perform do |res|
|
||||
if res.code == 200 && res.mime_type == 'text/html'
|
||||
@html = res.body_with_limit
|
||||
@html_charset = res.charset
|
||||
@html = res.body_with_limit
|
||||
else
|
||||
@html = nil
|
||||
@html_charset = nil
|
||||
@html = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@@ -72,7 +72,7 @@ class SearchService < BaseService
|
||||
end
|
||||
|
||||
def url_query?
|
||||
@resolve && @query =~ /\Ahttps?:\/\//
|
||||
@resolve && /\Ahttps?:\/\//.match?(@query)
|
||||
end
|
||||
|
||||
def url_resource_results
|
||||
|
Reference in New Issue
Block a user