mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-22 08:06:55 +00:00
AntiMentionSpamPolicy: fix user age check
This commit is contained in:
parent
5e963736ce
commit
64cacc3694
1 changed files with 2 additions and 3 deletions
|
@ -12,9 +12,8 @@ defmodule Pleroma.Web.ActivityPub.MRF.AntiMentionSpamPolicy do
|
|||
defp user_has_posted?(%User{} = u), do: u.note_count > 0
|
||||
|
||||
defp user_has_age?(%User{} = u) do
|
||||
now = NaiveDateTime.utc_now()
|
||||
diff = u.inserted_at |> NaiveDateTime.diff(now, :second)
|
||||
diff > :timer.seconds(30)
|
||||
diff = NaiveDateTime.utc_now() |> NaiveDateTime.diff(u.inserted_at, :second)
|
||||
diff >= :timer.seconds(30)
|
||||
end
|
||||
|
||||
defp good_reputation?(%User{} = u) do
|
||||
|
|
Loading…
Reference in a new issue