Fix missing announces in MastoAPI home timeline
authorrinpatch <rinpatch@sdf.org>
Wed, 27 Mar 2019 09:28:53 +0000 (12:28 +0300)
committerrinpatch <rinpatch@sdf.org>
Wed, 27 Mar 2019 09:28:53 +0000 (12:28 +0300)
Closes #762

lib/pleroma/web/activity_pub/activity_pub.ex

index 0d9a89d0b2dc3bee4557416a25669e94244da7b5..6e1ed7ec9dc51e45c5abdc0bfcf946d6fc6ea342 100644 (file)
@@ -737,8 +737,13 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
 
     from(
       activity in query,
-      where: fragment("not ?->>'type' = 'Announce'", activity.data),
-      where: fragment("not ? = ANY(?)", activity.actor, ^muted_reblogs)
+      where:
+        fragment(
+          "not ( ?->>'type' = 'Announce' and ? = ANY(?))",
+          activity.data,
+          activity.actor,
+          ^muted_reblogs
+        )
     )
   end