mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-25 23:43:24 +00:00
Merge branch 'object-tombstone-visibility' into 'develop'
Visibility: check Tombstone objects in visible_for_user?/2 See merge request pleroma/pleroma!3490
This commit is contained in:
commit
d8a986c9e8
|
@ -57,6 +57,7 @@ defmodule Pleroma.Web.ActivityPub.Visibility do
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue