Add way to update most recent notification id.

This commit is contained in:
Roger Braun 2017-07-02 15:01:59 +02:00
commit e343c0c9c4
4 changed files with 41 additions and 1 deletions

View file

@ -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"}),