Add numeric_ap_ids feature flag to switch new accounts to numeric AP identifiers (#36316)
This commit is contained in:
@@ -446,6 +446,7 @@ 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!
|
||||
@@ -470,6 +471,12 @@ 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?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user