aboutsummaryrefslogtreecommitdiff
path: root/lib/mix/tasks/pleroma
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-08-08 12:40:52 -0500
committerMark Felder <feld@FreeBSD.org>2020-08-08 12:40:52 -0500
commitcf4c97242be588e55dfccb37ab2c3d6dcac3cb0f (patch)
tree5f0671e82c499dc4fa5f1886cd458ed996e5e6fe /lib/mix/tasks/pleroma
parent2e7c5fe2ded095c95f8596970d8fc3aaf0128f1b (diff)
downloadpleroma-cf4c97242be588e55dfccb37ab2c3d6dcac3cb0f.tar.gz
Ensure we only expire Create activities with the Mix task
Diffstat (limited to 'lib/mix/tasks/pleroma')
-rw-r--r--lib/mix/tasks/pleroma/database.ex1
1 files changed, 1 insertions, 0 deletions
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 ->