Ensure we only expire Create activities with the Mix task

This commit is contained in:
Mark Felder 2020-08-08 12:40:52 -05:00
parent 2e7c5fe2de
commit cf4c97242b
1 changed files with 1 additions and 0 deletions

View File

@ -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 ->