Add field to user schema for controlling disclosure of client details

This commit is contained in:
Mark Felder 2021-02-18 16:43:41 -06:00
parent d5ef02c7a7
commit 83301fe61a
2 changed files with 16 additions and 0 deletions

View file

@ -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,

View file

@ -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