From ce6d64bbd8570c0c8bc46efe8a5a338876687df8 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Wed, 27 Mar 2019 12:28:53 +0300 Subject: [PATCH] Fix missing announces in MastoAPI home timeline Closes #762 --- lib/pleroma/web/activity_pub/activity_pub.ex | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 0d9a89d0b..6e1ed7ec9 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -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 -- 2.45.2