X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fmastodon_api%2Fcontrollers%2Faccount_controller.ex;h=80497a2527ea2eb2f8d7d2dc66cd231e3353f2a1;hb=0cfd5b4e89b02688342345755577e58eece3db0f;hp=946c8544fe2fbd64a5c8e38598816cecf3fd5f27;hpb=2d019e14e386fdd3391bb6d0bf36348dad78b075;p=akkoma diff --git a/lib/pleroma/web/mastodon_api/controllers/account_controller.ex b/lib/pleroma/web/mastodon_api/controllers/account_controller.ex index 946c8544f..80497a252 100644 --- a/lib/pleroma/web/mastodon_api/controllers/account_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/account_controller.ex @@ -175,6 +175,11 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do value -> {:ok, value} end + status_ttl_days_value = fn + -1 -> {:ok, nil} + value -> {:ok, value} + end + user_params = [ :no_rich_text, @@ -215,7 +220,9 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do # Note: param name is indeed :discoverable (not an error) |> Maps.put_if_present(:is_discoverable, params[:discoverable]) |> Maps.put_if_present(:language, Pleroma.Web.Gettext.normalize_locale(params[:language])) + |> Maps.put_if_present(:status_ttl_days, params[:status_ttl_days], status_ttl_days_value) + IO.inspect(user_params) # What happens here: # # We want to update the user through the pipeline, but the ActivityPub