X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fmix%2Ftasks%2Fpleroma%2Frefresh_counter_cache.ex;h=66eed86570d7e0a0ea1f6c38a8d1fbf34710934d;hb=75b94a2f352ea255b0785d0f3ba2c849c8355e04;hp=b44e2545d08b6fc4f7b799eed585e0e31ac2dd4f;hpb=01b06d6dbfdeff7e1733d575fb94eee4dafbb56a;p=akkoma
diff --git a/lib/mix/tasks/pleroma/refresh_counter_cache.ex b/lib/mix/tasks/pleroma/refresh_counter_cache.ex
index b44e2545d..66eed8657 100644
--- a/lib/mix/tasks/pleroma/refresh_counter_cache.ex
+++ b/lib/mix/tasks/pleroma/refresh_counter_cache.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.RefreshCounterCache do
@@ -42,7 +42,7 @@ defmodule Mix.Tasks.Pleroma.RefreshCounterCache do
Activity
|> where([a], fragment("(? ->> 'type'::text) = 'Create'", a.data))
- |> where([a], like(a.actor, ^"%#{instance}%"))
+ |> where([a], fragment("split_part(?, '/', 3) = ?", a.actor, ^instance))
|> select(
[a],
{fragment(