From d5021647d753e6457e459b1f992da60876292428 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 20 Jun 2023 15:44:49 +0200 Subject: [PATCH] fix(federation): allow federated usernames with capitals Signed-off-by: Thomas Citharel --- lib/mobilizon/actors/actor.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mobilizon/actors/actor.ex b/lib/mobilizon/actors/actor.ex index 21ee6eaec..36ec653b8 100644 --- a/lib/mobilizon/actors/actor.ex +++ b/lib/mobilizon/actors/actor.ex @@ -341,7 +341,7 @@ defmodule Mobilizon.Actors.Actor do |> put_address(attrs) |> unique_constraint(:url, name: :actors_url_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)) end