projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[#3251] Fixed wrong test-env config setting for [Pleroma.Upload]. Refactoring. Added...
[akkoma]
/
test
/
support
/
builders
/
activity_builder.ex
diff --git
a/test/support/builders/activity_builder.ex
b/test/support/builders/activity_builder.ex
index d9c188955420650578778a7b3ba1d2b62abe6279..7c4950bfa08a6b9559f587daa3e7bc5a49b77b24 100644
(file)
--- a/
test/support/builders/activity_builder.ex
+++ b/
test/support/builders/activity_builder.ex
@@
-1,5
+1,4
@@
defmodule Pleroma.Builders.ActivityBuilder do
defmodule Pleroma.Builders.ActivityBuilder do
- alias Pleroma.Builders.UserBuilder
alias Pleroma.Web.ActivityPub.ActivityPub
def build(data \\ %{}, opts \\ %{}) do
alias Pleroma.Web.ActivityPub.ActivityPub
def build(data \\ %{}, opts \\ %{}) do
@@
-22,11
+21,19
@@
defmodule Pleroma.Builders.ActivityBuilder do
def insert(data \\ %{}, opts \\ %{}) do
activity = build(data, opts)
def insert(data \\ %{}, opts \\ %{}) do
activity = build(data, opts)
- ActivityPub.insert(activity)
+
+ case ActivityPub.insert(activity) do
+ ok = {:ok, activity} ->
+ ActivityPub.notify_and_stream(activity)
+ ok
+
+ error ->
+ error
+ end
end
def insert_list(times, data \\ %{}, opts \\ %{}) do
end
def insert_list(times, data \\ %{}, opts \\ %{}) do
- Enum.map(1..times, fn n ->
+ Enum.map(1..times, fn
_
n ->
{:ok, activity} = insert(data, opts)
activity
end)
{:ok, activity} = insert(data, opts)
activity
end)