From 5a371892a031ecc7359ff45d1119ae41a20f46dd Mon Sep 17 00:00:00 2001 From: lain Date: Sat, 17 Feb 2018 10:26:44 +0100 Subject: [PATCH] Fix specs. --- lib/pleroma/web/activity_pub/activity_pub.ex | 1 + test/support/factory.ex | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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 @@ defp restrict_tag(query, %{"tag" => tag}) 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 @@ def note_activity_factory do %Pleroma.Activity{ data: data, - actor: data["actor"] + actor: data["actor"], + recipients: data["to"] } end