0
0
Fork 0

Add stricter protocol fields validation for accounts (#25937)

This commit is contained in:
Claire 2023-07-20 18:23:48 +02:00 committed by GitHub
parent 1cceb62afd
commit 1e3b19230a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 96 additions and 49 deletions

View file

@ -13,5 +13,6 @@ Fabricator(:account) do
suspended_at { |attrs| attrs[:suspended] ? Time.now.utc : nil }
silenced_at { |attrs| attrs[:silenced] ? Time.now.utc : nil }
user { |attrs| attrs[:domain].nil? ? Fabricate.build(:user, account: nil) : nil }
uri { |attrs| attrs[:domain].nil? ? '' : "https://#{attrs[:domain]}/users/#{attrs[:username]}" }
discoverable true
end