projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b221d77
)
Visibility: check Tombstone objects in visible_for_user?/2
author
Alex Gleason
<alex@alexgleason.me>
Tue, 27 Jul 2021 13:54:01 +0000
(08:54 -0500)
committer
Alex Gleason
<alex@alexgleason.me>
Tue, 27 Jul 2021 13:54:01 +0000
(08:54 -0500)
lib/pleroma/web/activity_pub/visibility.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/activity_pub/visibility.ex
b/lib/pleroma/web/activity_pub/visibility.ex
index 00234c0b05c7eddf9d0cac3b86f4f8b4e516d73a..6d8d7e442957cd01716d7088dc2ad4e47dd308a9 100644
(file)
--- 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