aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/user.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/user.ex')
-rw-r--r--lib/pleroma/user.ex6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex
index 23e650ce5..a30c8daed 100644
--- a/lib/pleroma/user.ex
+++ b/lib/pleroma/user.ex
@@ -46,6 +46,12 @@ defmodule Pleroma.User do
|> validate_required([:following])
end
+ def info_changeset(struct, params \\ %{}) do
+ struct
+ |> cast(params, [:info])
+ |> validate_required([:info])
+ end
+
def user_info(%User{} = user) do
note_count_query = from a in Object,
where: fragment("? @> ?", a.data, ^%{actor: user.ap_id, type: "Note"}),