Change spam check to apply to local accounts and add a threshold (#11806)
Instead of detecting spam on first duplicate message, add a threshold of 5 such messages to reduce false positives
This commit is contained in:
parent
577706987d
commit
4f6af87906
4 changed files with 66 additions and 29 deletions
|
@ -408,15 +408,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
|||
end
|
||||
|
||||
def check_for_spam
|
||||
spam_check = SpamCheck.new(@status)
|
||||
|
||||
return if spam_check.skip?
|
||||
|
||||
if spam_check.spam?
|
||||
spam_check.flag!
|
||||
else
|
||||
spam_check.remember!
|
||||
end
|
||||
SpamCheck.perform(@status)
|
||||
end
|
||||
|
||||
def forward_for_reply
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue