Fix specs.
authorlain <lain@soykaf.club>
Sat, 17 Feb 2018 09:26:44 +0000 (10:26 +0100)
committerlain <lain@soykaf.club>
Sat, 17 Feb 2018 09:26:44 +0000 (10:26 +0100)
lib/pleroma/web/activity_pub/activity_pub.ex
test/support/factory.ex

index 4848cc5421fd3142edba43f142027da6eda9d706..b6a2d6c5e9de1293891d01f3fbff039086e2baa9 100644 (file)
@@ -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)
index 7f378915ed93c76ba525de0c8149e8e494cd53a6..1445fe828512f17fa406e68bc6f9f555b8d77f53 100644 (file)
@@ -52,7 +52,8 @@ defmodule Pleroma.Factory do
 
     %Pleroma.Activity{
       data: data,
-      actor: data["actor"]
+      actor: data["actor"],
+      recipients: data["to"]
     }
   end