Merge branch 'fix/tusky-dm' into 'develop'
[akkoma] / lib / pleroma / web / activity_pub / activity_pub.ex
index 85fa83e2b55c0b716dc56ebf44057bdef0fc5bf7..6b4682e35837ca04ee02ac471cd98795915b9045 100644 (file)
@@ -36,6 +36,14 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
     {recipients, to, cc}
   end
 
+  defp get_recipients(%{"type" => "Create"} = data) do
+    to = data["to"] || []
+    cc = data["cc"] || []
+    actor = data["actor"] || []
+    recipients = (to ++ cc ++ [actor]) |> Enum.uniq()
+    {recipients, to, cc}
+  end
+
   defp get_recipients(data) do
     to = data["to"] || []
     cc = data["cc"] || []