aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/pleroma/web/activity_pub/activity_pub.ex1
-rw-r--r--test/support/factory.ex3
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex
index 4848cc542..b6a2d6c5e 100644
--- a/lib/pleroma/web/activity_pub/activity_pub.ex
+++ b/lib/pleroma/web/activity_pub/activity_pub.ex
@@ -139,6 +139,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
end
defp restrict_tag(query, _), do: query
+ defp restrict_recipients(query, []), do: query
defp restrict_recipients(query, recipients) do
from activity in query,
where: fragment("? && ?", ^recipients, activity.recipients)
diff --git a/test/support/factory.ex b/test/support/factory.ex
index 7f378915e..1445fe828 100644
--- a/test/support/factory.ex
+++ b/test/support/factory.ex
@@ -52,7 +52,8 @@ defmodule Pleroma.Factory do
%Pleroma.Activity{
data: data,
- actor: data["actor"]
+ actor: data["actor"],
+ recipients: data["to"]
}
end