diff options
author | William Pitcock <nenolod@dereferenced.org> | 2018-10-28 05:45:33 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2018-10-28 05:45:33 +0000 |
commit | 72ea54de6e74084d69594c544bcddcc0a991603a (patch) | |
tree | 98503dcc000d885fad5fa7983670bb5219e70614 /lib | |
parent | 310a4bc25cf4b30a1c49a2eece9141d2314b11db (diff) | |
download | pleroma-72ea54de6e74084d69594c544bcddcc0a991603a.tar.gz |
activitypub: fix possible false positives with broken thread filtering
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/activity_pub/activity_pub.ex | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 173ca688d..4b8b6eb52 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -793,9 +793,10 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do # child def entire_thread_visible_for_user?( - %Activity{data: %{"object" => %{"inReplyTo" => _parent_id}}} = tail, + %Activity{data: %{"object" => %{"inReplyTo" => parent_id}}} = tail, user - ) do + ) + when is_binary(parent_id) do parent = Activity.get_in_reply_to_activity(tail) visible_for_user?(tail, user) && entire_thread_visible_for_user?(parent, user) end |