fix(federation): allow federated usernames with capitals
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
56f341e960
commit
d5021647d7
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue