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:
commit
e40c221c31
67 changed files with 3309 additions and 119 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue