Prevent duplicates from being processed

This commit is contained in:
Mark Felder 2021-02-19 09:59:30 -06:00
parent 3949cfdc24
commit 3989ec508c

View File

@ -38,6 +38,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.FollowBotPolicy do
Enum.concat([to, cc, actor]) Enum.concat([to, cc, actor])
|> List.flatten() |> List.flatten()
|> Enum.uniq()
|> User.get_all_by_ap_id() |> User.get_all_by_ap_id()
|> Enum.each(fn user -> |> Enum.each(fn user ->
since_thirty_days_ago = NaiveDateTime.utc_now() |> NaiveDateTime.add(-(86_400 * 30)) since_thirty_days_ago = NaiveDateTime.utc_now() |> NaiveDateTime.add(-(86_400 * 30))