mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-22 16:03:25 +00:00
Merge branch 'fix-federating-private-events' into 'master'
Content is visible only @ap_public is in "to" Closes #711 See merge request framasoft/mobilizon!1034
This commit is contained in:
commit
21d64659c5
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ defmodule Mobilizon.Federation.ActivityPub.Visibility do
|
||||||
def is_public?(%Activity{data: data}), do: is_public?(data)
|
def is_public?(%Activity{data: data}), do: is_public?(data)
|
||||||
|
|
||||||
def is_public?(data) when is_map(data) do
|
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
|
end
|
||||||
|
|
||||||
def is_public?(%Comment{deleted_at: deleted_at}), do: !is_nil(deleted_at)
|
def is_public?(%Comment{deleted_at: deleted_at}), do: !is_nil(deleted_at)
|
||||||
|
|
Loading…
Reference in a new issue