Browse Source

Visibility: check Tombstone objects in visible_for_user?/2

merge-requests/3498/head
Alex Gleason 2 years ago
parent
commit
9cc8642b80
No known key found for this signature in database GPG Key ID: 7211D1F99744FBB7
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      lib/pleroma/web/activity_pub/visibility.ex

+ 1
- 0
lib/pleroma/web/activity_pub/visibility.ex View 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


Loading…
Cancel
Save