From: William Pitcock Date: Sun, 28 Oct 2018 05:45:33 +0000 (+0000) Subject: activitypub: fix possible false positives with broken thread filtering X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=72ea54de6e74084d69594c544bcddcc0a991603a;p=akkoma activitypub: fix possible false positives with broken thread filtering --- 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