mirror of
https://github.com/mastodon/mastodon.git
synced 2026-08-22 11:14:53 -05:00
Fix remote users not being re-followed after URI change (#39861)
This commit is contained in:
@@ -57,6 +57,7 @@ class ActivityPub::ProcessAccountService < BaseService
|
||||
@old_public_keys = @account.present? ? (@account.keypairs.pluck(:public_key) + [@account.public_key.presence].compact) : []
|
||||
@old_protocol = @account&.protocol
|
||||
@suspension_changed = false
|
||||
@uri_changed = @account.present? && @account.uri != @uri
|
||||
|
||||
if @account.nil?
|
||||
with_redis do |redis|
|
||||
@@ -82,9 +83,7 @@ class ActivityPub::ProcessAccountService < BaseService
|
||||
end
|
||||
|
||||
after_protocol_change! if protocol_changed?
|
||||
|
||||
# TODO: extend this to an identity change, and do this on `uri` change as well
|
||||
after_key_change! if all_public_keys_changed? && !signed_with_known_key
|
||||
after_identity_change! if @uri_changed || (!signed_with_known_key && all_public_keys_changed?)
|
||||
|
||||
# TODO: maybe tie tombstones to specific keys? i.e. we don't need to keep tombstones if all keys changed
|
||||
clear_tombstones! if all_public_keys_changed?
|
||||
@@ -300,7 +299,7 @@ class ActivityPub::ProcessAccountService < BaseService
|
||||
ActivityPub::PostUpgradeWorker.perform_async(@account.domain)
|
||||
end
|
||||
|
||||
def after_key_change!
|
||||
def after_identity_change!
|
||||
RefollowWorker.perform_async(@account.id)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user