From: Alex Gleason Date: Tue, 27 Jul 2021 13:54:01 +0000 (-0500) Subject: Visibility: check Tombstone objects in visible_for_user?/2 X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=9cc8642b80a3eceac405751a9c6b0be8e55db56d;p=akkoma Visibility: check Tombstone objects in visible_for_user?/2 --- diff --git a/lib/pleroma/web/activity_pub/visibility.ex b/lib/pleroma/web/activity_pub/visibility.ex index 00234c0b0..6d8d7e442 100644 --- a/lib/pleroma/web/activity_pub/visibility.ex +++ b/lib/pleroma/web/activity_pub/visibility.ex @@ -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