projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e7c5fe
)
Ensure we only expire Create activities with the Mix task
author
Mark Felder
<feld@FreeBSD.org>
Sat, 8 Aug 2020 17:40:52 +0000
(12:40 -0500)
committer
Mark Felder
<feld@FreeBSD.org>
Sat, 8 Aug 2020 17:40:52 +0000
(12:40 -0500)
lib/mix/tasks/pleroma/database.ex
patch
|
blob
|
history
diff --git
a/lib/mix/tasks/pleroma/database.ex
b/lib/mix/tasks/pleroma/database.ex
index d57e59b113da8e40787e0d5088ee83b91f72a17c..b2dc3d0f3b81075bbe12ac083e0d0f65331d9a9d 100644
(file)
--- 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 ->