mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-26 16:02:18 +00:00
Better checking of previous follow request attempts
This commit is contained in:
parent
3989ec508c
commit
a176914c73
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue