Commit f0ec158d authored by Hakaba Hitoyo's avatar Hakaba Hitoyo

add actor_type into users table and model

parent 34cdbcbb
Pipeline #20404 failed with stages
in 8 minutes and 17 seconds
......@@ -104,6 +104,7 @@ defmodule Pleroma.User do
field(:discoverable, :boolean, default: false)
field(:invisible, :boolean, default: false)
field(:skip_thread_containment, :boolean, default: false)
field(:actor_type, :string, default: "Person")
field(:notification_settings, :map,
default: %{
......@@ -272,7 +273,8 @@ def remote_user_creation(params) do
:fields,
:following_count,
:discoverable,
:invisible
:invisible,
:actor_type
]
)
|> validate_required([:name, :ap_id])
......@@ -320,7 +322,8 @@ def update_changeset(struct, params \\ %{}) do
:fields,
:raw_fields,
:pleroma_settings_store,
:discoverable
:discoverable,
:actor_type
]
)
|> unique_constraint(:nickname)
......@@ -360,7 +363,8 @@ def upgrade_changeset(struct, params \\ %{}, remote? \\ false) do
:hide_followers,
:discoverable,
:hide_followers_count,
:hide_follows_count
:hide_follows_count,
:actor_type
]
)
|> unique_constraint(:nickname)
......
defmodule Pleroma.Repo.Migrations.AddActivitypubActorType do
use Ecto.Migration
def change do
alter table("users") do
add :actor_type, :string, default: "Person"
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment