Better checking of previous follow request attempts

This commit is contained in:
Mark Felder 2021-02-19 14:42:20 -06:00
parent 3989ec508c
commit a176914c73
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ defp outstanding_follow_request_since?(
|> 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