From 9cc8642b80a3eceac405751a9c6b0be8e55db56d Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 27 Jul 2021 08:54:01 -0500 Subject: [PATCH] Visibility: check Tombstone objects in visible_for_user?/2 --- lib/pleroma/web/activity_pub/visibility.ex | 1 + 1 file changed, 1 insertion(+) 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 -- 2.45.2