Prevent duplicates from being processed
authorMark Felder <feld@feld.me>
Fri, 19 Feb 2021 15:59:30 +0000 (09:59 -0600)
committerMark Felder <feld@feld.me>
Tue, 30 Mar 2021 16:10:44 +0000 (11:10 -0500)
lib/pleroma/web/activity_pub/mrf/follow_bot_policy.ex

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