Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: app/javascript/mastodon/initial_state.js db/schema.rb Upstream added a new field to initial_state. Not too sure about what happened with db/schema.rb though…
This commit is contained in:
@ -2,13 +2,25 @@
|
||||
|
||||
class BootstrapTimelineService < BaseService
|
||||
def call(source_account)
|
||||
bootstrap_timeline_accounts.each do |target_account|
|
||||
FollowService.new.call(source_account, target_account)
|
||||
end
|
||||
@source_account = source_account
|
||||
|
||||
autofollow_inviter!
|
||||
autofollow_bootstrap_timeline_accounts!
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def autofollow_inviter!
|
||||
return unless @source_account&.user&.invite&.autofollow?
|
||||
FollowService.new.call(@source_account, @source_account.user.invite.user.account)
|
||||
end
|
||||
|
||||
def autofollow_bootstrap_timeline_accounts!
|
||||
bootstrap_timeline_accounts.each do |target_account|
|
||||
FollowService.new.call(@source_account, target_account)
|
||||
end
|
||||
end
|
||||
|
||||
def bootstrap_timeline_accounts
|
||||
return @bootstrap_timeline_accounts if defined?(@bootstrap_timeline_accounts)
|
||||
|
||||
|
@ -22,7 +22,6 @@ class PostStatusService < BaseService
|
||||
media = validate_media!(options[:media_ids])
|
||||
status = nil
|
||||
text = options.delete(:spoiler_text) if text.blank? && options[:spoiler_text].present?
|
||||
text = '.' if text.blank? && media.present?
|
||||
|
||||
ApplicationRecord.transaction do
|
||||
status = account.statuses.create!(text: text,
|
||||
|
Reference in New Issue
Block a user