Visibility: check Tombstone objects in visible_for_user?/2
authorAlex Gleason <alex@alexgleason.me>
Tue, 27 Jul 2021 13:54:01 +0000 (08:54 -0500)
committerAlex Gleason <alex@alexgleason.me>
Tue, 27 Jul 2021 13:54:01 +0000 (08:54 -0500)
lib/pleroma/web/activity_pub/visibility.ex

index 00234c0b05c7eddf9d0cac3b86f4f8b4e516d73a..6d8d7e442957cd01716d7088dc2ad4e47dd308a9 100644 (file)
@@ -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