mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 08:36:29 +00:00
Merge branch 'bugfix/broken-thread-filtering-false-positive' into 'develop'
activitypub: fix possible false positives with broken thread filtering See merge request pleroma/pleroma!398
This commit is contained in:
commit
39103a91be
1 changed files with 3 additions and 2 deletions
|
@ -793,9 +793,10 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
||||||
|
|
||||||
# child
|
# child
|
||||||
def entire_thread_visible_for_user?(
|
def entire_thread_visible_for_user?(
|
||||||
%Activity{data: %{"object" => %{"inReplyTo" => _parent_id}}} = tail,
|
%Activity{data: %{"object" => %{"inReplyTo" => parent_id}}} = tail,
|
||||||
user
|
user
|
||||||
) do
|
)
|
||||||
|
when is_binary(parent_id) do
|
||||||
parent = Activity.get_in_reply_to_activity(tail)
|
parent = Activity.get_in_reply_to_activity(tail)
|
||||||
visible_for_user?(tail, user) && entire_thread_visible_for_user?(parent, user)
|
visible_for_user?(tail, user) && entire_thread_visible_for_user?(parent, user)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue