Merge remote-tracking branch 'tootsuite/master'

This commit is contained in:
David Yip
2017-11-19 01:30:29 -06:00
38 changed files with 852 additions and 42 deletions

View File

@@ -74,6 +74,7 @@ class ActivityPub::ProcessAccountService < BaseService
@account.statuses_count = outbox_total_items if outbox_total_items.present?
@account.following_count = following_total_items if following_total_items.present?
@account.followers_count = followers_total_items if followers_total_items.present?
@account.moved_to_account = moved_account if @json['movedTo'].present?
end
def after_protocol_change!
@@ -137,6 +138,12 @@ class ActivityPub::ProcessAccountService < BaseService
@collections[type] = nil
end
def moved_account
account = ActivityPub::TagManager.instance.uri_to_resource(@json['movedTo'], Account)
account ||= ActivityPub::FetchRemoteAccountService.new.call(@json['movedTo'], id: true)
account
end
def skip_download?
@account.suspended? || domain_block&.reject_media?
end