From: Mark Felder Date: Sat, 8 Aug 2020 17:40:52 +0000 (-0500) Subject: Ensure we only expire Create activities with the Mix task X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=cf4c97242be588e55dfccb37ab2c3d6dcac3cb0f;p=akkoma Ensure we only expire Create activities with the Mix task --- diff --git a/lib/mix/tasks/pleroma/database.ex b/lib/mix/tasks/pleroma/database.ex index d57e59b11..b2dc3d0f3 100644 --- a/lib/mix/tasks/pleroma/database.ex +++ b/lib/mix/tasks/pleroma/database.ex @@ -136,6 +136,7 @@ defmodule Mix.Tasks.Pleroma.Database do |> join(:left, [a], u in assoc(a, :expiration)) |> where(local: true) |> where([a, u], is_nil(u)) + |> where([a], fragment("(? ->> 'type'::text) = 'Create'", a.data)) |> Pleroma.RepoStreamer.chunk_stream(100) |> Stream.each(fn activities -> Enum.each(activities, fn activity ->