Commit d8a986c9 authored by feld's avatar feld
Browse files

Merge branch 'object-tombstone-visibility' into 'develop'

Visibility: check Tombstone objects in visible_for_user?/2

See merge request !3490
parents 7495beeb 7f23dd6c
Pipeline #36913 canceled with stages
in 41 minutes and 55 seconds
......@@ -57,6 +57,7 @@ def is_list?(%{data: %{"listMessage" => _}}), do: true
def is_list?(_), do: false
@spec visible_for_user?(Object.t() | Activity.t() | nil, User.t() | nil) :: boolean()
def visible_for_user?(%Object{data: %{"type" => "Tombstone"}}, _), do: false
def visible_for_user?(%Activity{actor: ap_id}, %User{ap_id: ap_id}), do: true
def visible_for_user?(%Object{data: %{"actor" => ap_id}}, %User{ap_id: ap_id}), do: true
def visible_for_user?(nil, _), do: false
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment