diff options
author | ThibG <thib@sitedethib.com> | 2017-09-14 00:05:25 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-09-14 00:05:25 +0200 |
commit | af00220d795670e10bc8c7378837c4a5a287b556 (patch) | |
tree | 2af132699498d374150f27351d2d9d07db9b14fb /app/services/activitypub | |
parent | 9239e4ce4d4e958e62552d4a01183d0295c020f5 (diff) |
Fix refollowing (#4931)
* Make RefollowWorker ActivityPub-only to avoid potential identifier mismatches * Don't call RefollowWorker on new accounts
Diffstat (limited to 'app/services/activitypub')
-rw-r--r-- | app/services/activitypub/process_account_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/activitypub/process_account_service.rb b/app/services/activitypub/process_account_service.rb index badb26720..a45681078 100644 --- a/app/services/activitypub/process_account_service.rb +++ b/app/services/activitypub/process_account_service.rb @@ -15,11 +15,11 @@ class ActivityPub::ProcessAccountService < BaseService @account = Account.find_by(uri: @uri) @collections = {} + old_public_key = @account&.public_key create_account if @account.nil? upgrade_account if @account.ostatus? - old_public_key = @account.public_key update_account - RefollowWorker.perform_async(@account.id) if old_public_key != @account.public_key + RefollowWorker.perform_async(@account.id) if !old_public_key.nil? && old_public_key != @account.public_key @account rescue Oj::ParseError |