Add numeric_ap_ids feature flag to switch new accounts to numeric AP identifiers (#36316)
This commit is contained in:
parent
669738ef3b
commit
f03d1bb21f
1 changed files with 7 additions and 0 deletions
|
|
@ -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?
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue