diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-12-04 18:56:31 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-12-04 18:56:31 +0300 |
commit | 30caf3e51e32830153e693727b3765e8817171a3 (patch) | |
tree | b752dd12604afa8be2bc7c753a64a5725bc2ebbc /lib/pleroma/user.ex | |
parent | 52cc7de82cf3aa637d599edc357909be8c9366eb (diff) | |
parent | 228bf4d214abe3bb62c52128d3bc145e396b174d (diff) | |
download | pleroma-30caf3e51e32830153e693727b3765e8817171a3.tar.gz |
Merge remote-tracking branch 'remotes/upstream/develop' into 1335-user-api-id-fields-relations
# Conflicts:
# lib/pleroma/user.ex
Diffstat (limited to 'lib/pleroma/user.ex')
-rw-r--r-- | lib/pleroma/user.ex | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index a2ca2c263..a68524377 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: %{ @@ -320,7 +322,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 +350,8 @@ defmodule Pleroma.User do :fields, :following_count, :discoverable, - :invisible + :invisible, + :also_known_as ] ) |> validate_required([:name, :ap_id]) @@ -391,13 +393,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 +439,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 +1339,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], |