Fix situations in which instance actor can be set to a Mastodon-incompatible name (#22307)

* Validate internal actor

* Use “internal.actor” by default for the server actor username

* Fix instance actor username on the fly if it includes ':'

* Change actor name from internal.actor to mastodon.internal
This commit is contained in:
Claire
2023-01-18 16:33:03 +01:00
committed by GitHub
parent 9b3e22c40d
commit d1387579b9
3 changed files with 7 additions and 5 deletions

View File

@ -1 +1 @@
Account.create_with(actor_type: 'Application', locked: true, username: ENV['LOCAL_DOMAIN'] || Rails.configuration.x.local_domain).find_or_create_by(id: -99)
Account.create_with(actor_type: 'Application', locked: true, username: 'mastodon.internal').find_or_create_by(id: -99)