Make AntiLinkSpamPolicy history-aware

This commit is contained in:
Tusooa Zhu 2022-07-24 00:18:09 -04:00
commit 997f08b350
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
2 changed files with 32 additions and 4 deletions

View file

@ -9,6 +9,9 @@ defmodule Pleroma.Web.ActivityPub.MRF.AntiLinkSpamPolicy do
require Logger
@impl true
def history_awareness, do: :auto
# has the user successfully posted before?
defp old_user?(%User{} = u) do
u.note_count > 0 || u.follower_count > 0