diff options
author | David Yip <yipdw@member.fsf.org> | 2017-11-19 01:30:29 -0600 |
---|---|---|
committer | David Yip <yipdw@member.fsf.org> | 2017-11-19 01:30:29 -0600 |
commit | d083f7741a5996ee24bbdb7cd177e4db2ddfaead (patch) | |
tree | 7c950b5ee0f16b59b7acae023eadd949325fc2d7 /app/services | |
parent | bcda3f85ce1473e9285299979a471525b2cd7034 (diff) | |
parent | 08deec4c84f00d241d60a6962806d5abe4638edd (diff) |
Merge remote-tracking branch 'tootsuite/master'
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/activitypub/process_account_service.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/services/activitypub/process_account_service.rb b/app/services/activitypub/process_account_service.rb index f93baf4b5..5ee7d89ee 100644 --- a/app/services/activitypub/process_account_service.rb +++ b/app/services/activitypub/process_account_service.rb @@ -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 |