mirror of
https://github.com/mastodon/mastodon.git
synced 2025-10-05 00:22:42 +00:00
Add numeric_ap_ids
feature flag to switch new accounts to numeric AP identifiers (#36316)
This commit is contained in:
parent
669738ef3b
commit
f03d1bb21f
|
@ -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…
Reference in New Issue
Block a user