From: Ariadne Conill Date: Sat, 5 Oct 2019 20:06:03 +0000 (+0000) Subject: user info: add invisible field X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=e7333db72ade8214ad80122d49862e520b093e8a;p=akkoma user info: add invisible field --- diff --git a/lib/pleroma/user/info.ex b/lib/pleroma/user/info.ex index 2d39abcb3..53525b386 100644 --- a/lib/pleroma/user/info.ex +++ b/lib/pleroma/user/info.ex @@ -53,6 +53,7 @@ defmodule Pleroma.User.Info do field(:fields, {:array, :map}, default: nil) field(:raw_fields, {:array, :map}, default: []) field(:discoverable, :boolean, default: false) + field(:invisible, :boolean, default: false) field(:notification_settings, :map, default: %{ @@ -393,6 +394,14 @@ defmodule Pleroma.User.Info do |> validate_required([:source_data]) end + def set_invisible(info, invisible) do + params = %{invisible: invisible} + + info + |> cast(params, [:invisible]) + |> validate_required([:invisible]) + end + def admin_api_update(info, params) do info |> cast(params, [