X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fuser.ex;h=b7f50e5acb4cbbf2add0b8ae6739b79acaa1568f;hb=22fc271e23a5dd1570ea7429b563f6edc42613c4;hp=a2ca2c263d753ba8fbbff86d465bef09ad6eb933;hpb=52cc7de82cf3aa637d599edc357909be8c9366eb;p=akkoma diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index a2ca2c263..b7f50e5ac 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -125,7 +125,9 @@ defmodule Pleroma.User do field(:raw_fields, {:array, :map}, default: []) field(:discoverable, :boolean, default: false) field(:invisible, :boolean, default: false) + field(:allow_following_move, :boolean, default: true) field(:skip_thread_containment, :boolean, default: false) + field(:also_known_as, {:array, :string}, default: []) field(:notification_settings, :map, default: %{ @@ -167,8 +169,6 @@ defmodule Pleroma.User do has_many(incoming_relation_source, through: [incoming_relation, :source]) end - field(:info, :map, default: %{}) - # `:blocks` is deprecated (replaced with `blocked_users` relation) field(:blocks, {:array, :string}, default: []) # `:mutes` is deprecated (replaced with `muted_users` relation) @@ -320,7 +320,6 @@ defmodule Pleroma.User do params = params - |> Map.put(:info, params[:info] || %{}) |> truncate_if_exists(:name, name_limit) |> truncate_if_exists(:bio, bio_limit) |> truncate_fields_param() @@ -349,7 +348,8 @@ defmodule Pleroma.User do :fields, :following_count, :discoverable, - :invisible + :invisible, + :also_known_as ] ) |> validate_required([:name, :ap_id]) @@ -391,13 +391,15 @@ defmodule Pleroma.User do :hide_followers_count, :hide_follows_count, :hide_favorites, + :allow_following_move, :background, :show_role, :skip_thread_containment, :fields, :raw_fields, :pleroma_settings_store, - :discoverable + :discoverable, + :also_known_as ] ) |> unique_constraint(:nickname) @@ -435,9 +437,11 @@ defmodule Pleroma.User do :hide_follows, :fields, :hide_followers, + :allow_following_move, :discoverable, :hide_followers_count, - :hide_follows_count + :hide_follows_count, + :also_known_as ] ) |> unique_constraint(:nickname) @@ -1333,7 +1337,7 @@ defmodule Pleroma.User do def external_users(opts \\ []) do query = external_users_query() - |> select([u], struct(u, [:id, :ap_id, :info])) + |> select([u], struct(u, [:id, :ap_id])) query = if opts[:max_id],