field(:settings, :map, default: nil)
field(:magic_key, :string, default: nil)
field(:uri, :string, default: nil)
- field(:topic, :string, default: nil)
- field(:hub, :string, default: nil)
- field(:salmon, :string, default: nil)
field(:hide_followers_count, :boolean, default: false)
field(:hide_follows_count, :boolean, default: false)
field(:hide_followers, :boolean, default: false)
field(:hide_follows, :boolean, default: false)
field(:hide_favorites, :boolean, default: true)
+ field(:unread_conversation_count, :integer, default: 0)
field(:pinned_activities, {:array, :string}, default: [])
field(:email_notifications, :map, default: %{"digest" => false})
field(:mascot, :map, default: nil)
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: %{
:locked,
:magic_key,
:uri,
- :hub,
- :topic,
- :salmon,
:hide_followers,
:hide_follows,
:hide_followers_count,
name_limit = Pleroma.Config.get([:instance, :account_field_name_length], 255)
value_limit = Pleroma.Config.get([:instance, :account_field_value_length], 255)
- is_binary(name) &&
- is_binary(value) &&
- String.length(name) <= name_limit &&
+ is_binary(name) && is_binary(value) && String.length(name) <= name_limit &&
String.length(value) <= value_limit
end
|> 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, [