From: Mark Felder Date: Thu, 18 Feb 2021 22:43:41 +0000 (-0600) Subject: Add field to user schema for controlling disclosure of client details X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=83301fe61aa3d453b7c12ee1f5465d9802d07370;p=akkoma Add field to user schema for controlling disclosure of client details --- diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 51f5bc8ea..a52089d7b 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -147,6 +147,7 @@ defmodule Pleroma.User do field(:shared_inbox, :string) field(:accepts_chat_messages, :boolean, default: nil) field(:last_active_at, :naive_datetime) + field(:disclose_client, :boolean, default: true) embeds_one( :notification_settings, diff --git a/priv/repo/migrations/20210218223811_add_disclose_client_to_users.exs b/priv/repo/migrations/20210218223811_add_disclose_client_to_users.exs new file mode 100644 index 000000000..c6b6fe7b2 --- /dev/null +++ b/priv/repo/migrations/20210218223811_add_disclose_client_to_users.exs @@ -0,0 +1,15 @@ +defmodule Pleroma.Repo.Migrations.AddDiscloseClientToUsers do + use Ecto.Migration + + def up do + alter table(:users) do + add(:disclose_client, :boolean, default: true) + end + end + + def down do + alter table(:users) do + remove(:disclose_client) + end + end +end