Content is visible only @ap_public is in "to"

Closes #711

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-08-16 11:16:45 +02:00
parent a94f2bc536
commit f204141262
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -20,7 +20,7 @@ defmodule Mobilizon.Federation.ActivityPub.Visibility do
def is_public?(%Activity{data: data}), do: is_public?(data)
def is_public?(data) when is_map(data) do
@public in (make_list(Map.get(data, "to", [])) ++ make_list(Map.get(data, "cc", [])))
@public in make_list(Map.get(data, "to", []))
end
def is_public?(%Comment{deleted_at: deleted_at}), do: !is_nil(deleted_at)