X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fuser.ex;h=b0ab9d0cd6ada61835b7bad09019524b9edee2ef;hb=0cfd5b4e89b02688342345755577e58eece3db0f;hp=eb907a2d86340d43caef83fa7a6e8a7f9182de6c;hpb=2d019e14e386fdd3391bb6d0bf36348dad78b075;p=akkoma diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index eb907a2d8..b0ab9d0cd 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -151,6 +151,7 @@ defmodule Pleroma.User do field(:is_suggested, :boolean, default: false) field(:last_status_at, :naive_datetime) field(:language, :string) + field(:status_ttl_days, :integer, default: nil) embeds_one( :notification_settings, @@ -516,7 +517,8 @@ defmodule Pleroma.User do :pleroma_settings_store, :is_discoverable, :actor_type, - :disclose_client + :disclose_client, + :status_ttl_days ] ) |> unique_constraint(:nickname) @@ -524,6 +526,7 @@ defmodule Pleroma.User do |> validate_length(:bio, max: bio_limit) |> validate_length(:name, min: 1, max: name_limit) |> validate_inclusion(:actor_type, ["Person", "Service"]) + |> validate_number(:status_ttl_days, greater_than: 0) |> put_fields() |> put_emoji() |> put_change_if_present(:bio, &{:ok, parse_bio(&1, struct)})