From: Maxim Filippov Date: Sun, 24 Nov 2019 16:39:35 +0000 (+0900) Subject: AdminAPI: Fix grouped reports for closed/resolved reports X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=1364d303f8e4dcd4d9f7913d4755c58b0f4b87ef;p=akkoma AdminAPI: Fix grouped reports for closed/resolved reports --- diff --git a/lib/pleroma/web/activity_pub/utils.ex b/lib/pleroma/web/activity_pub/utils.ex index 277ca3c7c..9e460b604 100644 --- a/lib/pleroma/web/activity_pub/utils.ex +++ b/lib/pleroma/web/activity_pub/utils.ex @@ -852,7 +852,8 @@ defmodule Pleroma.Web.ActivityPub.Utils do def get_reports_by_status_id(ap_id) do from(a in Activity, where: fragment("(?)->>'type' = 'Flag'", a.data), - where: fragment("(?)->'object' @> ?", a.data, ^[%{id: ap_id}]) + where: fragment("(?)->'object' @> ?", a.data, ^[%{id: ap_id}]), + or_where: fragment("(?)->'object' @> ?", a.data, ^[ap_id]) ) |> Activity.with_preloaded_user_actor() |> Repo.all()