logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: a176914c73456eea7926235eb48e342ac1ab112d
parent 3989ec508c00a66d9093ead06deb8b1272b0b985
Author: Mark Felder <feld@feld.me>
Date:   Fri, 19 Feb 2021 14:42:20 -0600

Better checking of previous follow request attempts

Diffstat:

Mlib/pleroma/web/activity_pub/mrf/follow_bot_policy.ex2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/pleroma/web/activity_pub/mrf/follow_bot_policy.ex b/lib/pleroma/web/activity_pub/mrf/follow_bot_policy.ex @@ -65,7 +65,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.FollowBotPolicy do |> Queries.by_object_id() |> Queries.by_type("Follow") |> where([a], a.inserted_at > ^since_datetime) - |> where([a], fragment("? ->> 'state' = 'pending'", a.data)) + |> where([a], fragment("? ->> 'state' != 'accept'", a.data)) |> where([a], a.actor == ^follower_id) |> Repo.exists?() end