reverting pinned posts in filtering

This commit is contained in:
Alexander Strizhakov 2020-08-12 20:01:21 +03:00
parent 3ab83f837e
commit 29a7bcd5bb
No known key found for this signature in database
GPG Key ID: 022896A53AEF1381
1 changed files with 2 additions and 4 deletions

View File

@ -150,10 +150,8 @@ def run(["ensure_expiration"]) do
|> Pleroma.RepoStreamer.chunk_stream(100) |> Pleroma.RepoStreamer.chunk_stream(100)
|> Stream.each(fn activities -> |> Stream.each(fn activities ->
Enum.each(activities, fn activity -> Enum.each(activities, fn activity ->
if not Pleroma.Activity.pinned_by_actor?(activity) do
expires_at = Timex.shift(activity.inserted_at, days: days) expires_at = Timex.shift(activity.inserted_at, days: days)
Pleroma.ActivityExpiration.create(activity, expires_at, false) Pleroma.ActivityExpiration.create(activity, expires_at, false)
end
end) end)
end) end)
|> Stream.run() |> Stream.run()