summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Filippov <colixer@gmail.com>2019-11-25 01:39:35 +0900
committerMaxim Filippov <colixer@gmail.com>2019-11-25 01:39:35 +0900
commita4b4f6b704571d85e3703988d8b6f868bcae14c9 (patch)
tree51e6be6eac6fb7fca0d04027ec1f832fbe4bcca5
parent937d6c6b32fc735cb5a56d9a3d97a6b2e8f37f68 (diff)
AdminAPI: Fix grouped reports for closed/resolved reportsfix/admin-api-grouped-reports-closed-reports
-rw-r--r--lib/pleroma/web/activity_pub/utils.ex3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/utils.ex b/lib/pleroma/web/activity_pub/utils.ex
index c45662359..1e43eb68a 100644
--- a/lib/pleroma/web/activity_pub/utils.ex
+++ b/lib/pleroma/web/activity_pub/utils.ex
@@ -839,7 +839,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()