Fix argument error in streamer
authorkPherox <admin@mail.kr-kp.com>
Mon, 25 May 2020 14:21:43 +0000 (23:21 +0900)
committerkPherox <admin@mail.kr-kp.com>
Fri, 29 May 2020 15:31:18 +0000 (00:31 +0900)
`Repo.exists` can't use `nil` as it is unsafe.
Use parent object instead of activity because currently Announce activity's context is null.

lib/pleroma/web/streamer/streamer.ex

index 49a400df7e3ec4d4aa3ab2d9848873156df39c20..0cf41189b2f7b75e06dad3d1135b46f7a38f9562 100644 (file)
@@ -136,7 +136,7 @@ defmodule Pleroma.Web.Streamer do
          false <- Pleroma.Web.ActivityPub.MRF.subdomain_match?(domain_blocks, item_host),
          false <- Pleroma.Web.ActivityPub.MRF.subdomain_match?(domain_blocks, parent_host),
          true <- thread_containment(item, user),
-         false <- CommonAPI.thread_muted?(user, item) do
+         false <- CommonAPI.thread_muted?(user, parent) do
       false
     else
       _ -> true