fix(federation): allow federated usernames with capitals

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2023-06-20 15:44:49 +02:00
parent 56f341e960
commit d5021647d7
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
1 changed files with 1 additions and 1 deletions

View File

@ -341,7 +341,7 @@ defmodule Mobilizon.Actors.Actor do
|> put_address(attrs) |> put_address(attrs)
|> unique_constraint(:url, name: :actors_url_index) |> unique_constraint(:url, name: :actors_url_index)
|> unique_constraint(:preferred_username, name: :actors_preferred_username_domain_type_index) |> unique_constraint(:preferred_username, name: :actors_preferred_username_domain_type_index)
|> validate_format(:preferred_username, ~r/[a-z0-9_]+/) |> validate_format(:preferred_username, ~r/[A-z0-9_]+/)
|> put_change(:last_refreshed_at, DateTime.utc_now() |> DateTime.truncate(:second)) |> put_change(:last_refreshed_at, DateTime.utc_now() |> DateTime.truncate(:second))
end end