Fix note count update.

This commit is contained in:
lain 2018-11-18 18:52:21 +01:00
commit d5af41b577
3 changed files with 11 additions and 5 deletions

View file

@ -27,6 +27,10 @@ defmodule Pleroma.User.Info do
end
def add_to_note_count(info, number) do
set_note_count(info, info.note_count + number)
end
def set_note_count(info, number) do
params = %{note_count: Enum.max([0, number])}
info