Apply tusooa's suggestion

This commit is contained in:
tusooa 2024-03-07 11:55:31 +00:00 committed by marcin mikołajczak
parent 50e7706b26
commit 47ce33a90d
1 changed files with 2 additions and 4 deletions

View File

@ -2015,10 +2015,8 @@ defp verify_field_link(field, profile_urls) do
when not_empty_string(host) and scheme in ["http", "https"] <- when not_empty_string(host) and scheme in ["http", "https"] <-
URI.parse(value), URI.parse(value),
{:not_idn, true} <- {:not_idn, to_string(:idna.encode(host)) == host}, {:not_idn, true} <- {:not_idn, to_string(:idna.encode(host)) == host},
attr <- Pleroma.Web.RelMe.maybe_put_rel_me(value, profile_urls) do "me" <- Pleroma.Web.RelMe.maybe_put_rel_me(value, profile_urls) do
if attr == "me" do
CommonUtils.to_masto_date(NaiveDateTime.utc_now()) CommonUtils.to_masto_date(NaiveDateTime.utc_now())
end
else else
{:verified_at, value} when not_empty_string(value) -> {:verified_at, value} when not_empty_string(value) ->
value value