Do not add the "next" key to likes.json if there is no more items

This commit is contained in:
Sergey Suprunenko 2019-08-04 17:13:06 +00:00 committed by kaniini
commit e8ad116c2a
3 changed files with 55 additions and 6 deletions

View file

@ -182,8 +182,8 @@ defmodule Pleroma.Factory do
}
end
def like_activity_factory do
note_activity = insert(:note_activity)
def like_activity_factory(attrs \\ %{}) do
note_activity = attrs[:note_activity] || insert(:note_activity)
object = Object.normalize(note_activity)
user = insert(:user)