Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - app/models/media_attachment.rb Upstream raised max image size from 8MB to 10MB while our limit is configurable. Raised the default to 10MB.
This commit is contained in:
@ -17,7 +17,11 @@ class BootstrapTimelineService < BaseService
|
||||
|
||||
def autofollow_bootstrap_timeline_accounts!
|
||||
bootstrap_timeline_accounts.each do |target_account|
|
||||
FollowService.new.call(@source_account, target_account)
|
||||
begin
|
||||
FollowService.new.call(@source_account, target_account)
|
||||
rescue ActiveRecord::RecordNotFound, Mastodon::NotPermittedError
|
||||
nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -40,7 +44,9 @@ class BootstrapTimelineService < BaseService
|
||||
|
||||
def local_unlocked_accounts(usernames)
|
||||
Account.local
|
||||
.without_suspended
|
||||
.where(username: usernames)
|
||||
.where(locked: false)
|
||||
.where(moved_to_account_id: nil)
|
||||
end
|
||||
end
|
||||
|
@ -39,12 +39,6 @@ class FetchLinkCardService < BaseService
|
||||
def process_url
|
||||
@card ||= PreviewCard.new(url: @url)
|
||||
|
||||
failed = Request.new(:head, @url).perform do |res|
|
||||
res.code != 405 && res.code != 501 && (res.code != 200 || res.mime_type != 'text/html')
|
||||
end
|
||||
|
||||
return if failed
|
||||
|
||||
Request.new(:get, @url).perform do |res|
|
||||
if res.code == 200 && res.mime_type == 'text/html'
|
||||
@html = res.body_with_limit
|
||||
|
@ -21,7 +21,7 @@ class UpdateAccountService < BaseService
|
||||
|
||||
def authorize_all_follow_requests(account)
|
||||
follow_requests = FollowRequest.where(target_account: account)
|
||||
follow_requests = follow_requests.select { |req| !req.account.silenced? }
|
||||
follow_requests = follow_requests.preload(:account).select { |req| !req.account.silenced? }
|
||||
AuthorizeFollowWorker.push_bulk(follow_requests) do |req|
|
||||
[req.account_id, req.target_account_id]
|
||||
end
|
||||
|
Reference in New Issue
Block a user