2
0

Change new accounts to use new ActivityPub numeric ID scheme (#36365)

This commit is contained in:
Claire
2025-10-14 18:36:55 +02:00
committed by GitHub
parent 50743cc35b
commit 264d068d8d
12 changed files with 54 additions and 53 deletions

View File

@@ -52,7 +52,7 @@
# requested_review_at :datetime
# indexable :boolean default(FALSE), not null
# attribution_domains :string default([]), is an Array
# id_scheme :integer default("username_ap_id")
# id_scheme :integer default("numeric_ap_id")
#
class Account < ApplicationRecord
@@ -446,7 +446,6 @@ class Account < ApplicationRecord
before_validation :prepare_contents, if: :local?
before_create :generate_keys
before_create :set_id_scheme
before_destroy :clean_feed_manager
def ensure_keys!
@@ -471,12 +470,6 @@ class Account < ApplicationRecord
self.public_key = keypair.public_key.to_pem
end
def set_id_scheme
return unless local? && Mastodon::Feature.numeric_ap_ids_enabled?
self.id_scheme = :numeric_ap_id
end
def normalize_domain
return if local?