field(:is_moderator, :boolean, default: false)
field(:is_admin, :boolean, default: false)
field(:show_role, :boolean, default: true)
- field(:mastofe_settings, :map, default: nil)
field(:uri, ObjectValidators.Uri, default: nil)
field(:hide_followers_count, :boolean, default: false)
field(:hide_follows_count, :boolean, default: false)
ap_enabled: false,
is_moderator: false,
is_admin: false,
- mastofe_settings: nil,
mascot: nil,
emoji: %{},
pleroma_settings_store: %{},
|> update_and_set_cache()
end
- def mastodon_settings_update(user, settings) do
- user
- |> cast(%{mastofe_settings: settings}, [:mastofe_settings])
- |> validate_required([:mastofe_settings])
- |> update_and_set_cache()
- end
-
@spec confirmation_changeset(User.t(), keyword()) :: Changeset.t()
def confirmation_changeset(user, set_confirmation: confirmed?) do
params =
ap_enabled: true,
is_moderator: true,
is_admin: true,
- mastofe_settings: %{"a" => "b"},
mascot: %{"a" => "b"},
emoji: %{"a" => "b"},
pleroma_settings_store: %{"q" => "x"},
ap_enabled: false,
is_moderator: false,
is_admin: false,
- mastofe_settings: nil,
mascot: nil,
emoji: %{},
pleroma_settings_store: %{},