diff options
author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2020-10-27 22:44:31 +0000 |
---|---|---|
committer | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2020-10-27 22:44:31 +0000 |
commit | d8d4bd15d064e44d9900b91696a1ca2c373fcfc8 (patch) | |
tree | 0d082c3858439501b711758dd2aa2495ae23231c /lib | |
parent | 7d31122781c27e11e9e4ab62290cb772d64472d4 (diff) | |
parent | de6d49c8cec84a530f2835313c95064ae8df3604 (diff) | |
download | pleroma-d8d4bd15d064e44d9900b91696a1ca2c373fcfc8.tar.gz pleroma-d8d4bd15d064e44d9900b91696a1ca2c373fcfc8.zip |
Merge branch '2236-no-name' into 'develop'
Resolve "Account cannot be fetched by some instances"
Closes #2236
See merge request pleroma/pleroma!3101
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/user.ex | 5 | ||||
-rw-r--r-- | lib/pleroma/web/activity_pub/activity_pub.ex | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index dc41d0001..72f507f1e 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -426,7 +426,6 @@ defmodule Pleroma.User do params, [ :bio, - :name, :emoji, :ap_id, :inbox, @@ -455,7 +454,9 @@ defmodule Pleroma.User do :accepts_chat_messages ] ) - |> validate_required([:name, :ap_id]) + |> cast(params, [:name], empty_values: []) + |> validate_required([:ap_id]) + |> validate_required([:name], trim: false) |> unique_constraint(:nickname) |> validate_format(:nickname, @email_regex) |> validate_length(:bio, max: bio_limit) diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index d17c892a7..13869f897 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -1378,6 +1378,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do {:ok, data} <- user_data_from_user_object(data) do {:ok, maybe_update_follow_information(data)} else + # If this has been deleted, only log a debug and not an error {:error, "Object has been deleted" = e} -> Logger.debug("Could not decode user at fetch #{ap_id}, #{inspect(e)}") {:error, e} |