Fix note count update.
This commit is contained in:
parent
6f90ceb2ed
commit
d5af41b577
3 changed files with 11 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue