Merge branch 'from/upstream-develop/tusooa/edits' into 'develop'

Editing

Closes #1429, #2859, and #2288

See merge request pleroma/pleroma!3678
This commit is contained in:
Haelwenn 2022-09-03 02:16:42 +00:00
commit e40c221c31
67 changed files with 3309 additions and 119 deletions

View file

@ -111,6 +111,18 @@ defmodule Pleroma.Factory do
}
end
def attachment_factory(attrs \\ %{}) do
user = attrs[:user] || insert(:user)
data =
attachment_data(user.ap_id, nil)
|> Map.put("id", Pleroma.Web.ActivityPub.Utils.generate_object_id())
%Pleroma.Object{
data: merge_attributes(data, Map.get(attrs, :data, %{}))
}
end
def attachment_note_factory(attrs \\ %{}) do
user = attrs[:user] || insert(:user)
{length, attrs} = Map.pop(attrs, :length, 1)