Merge branch 'fix/tusky-dm' into 'develop'

Add actor to recipients list

Closes #390

See merge request pleroma/pleroma!683
This commit is contained in:
kaniini 2019-01-25 05:19:32 +00:00
commit 4c99b6d35a
9 changed files with 79 additions and 52 deletions

View 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"] || []