]> cat aescling's git repositories - mastodon.git/commitdiff
Exempt staff members from spam check (#12874)
authorThibG <thib@sitedethib.com>
Fri, 17 Jan 2020 06:50:30 +0000 (07:50 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Fri, 17 Jan 2020 06:50:30 +0000 (07:50 +0100)
Consider admins and moderators as trusted, for the purpose of the
spam checker.

Fixes #12872

app/lib/spam_check.rb

index 5b40514fd064017422d35b25d2291adfe162f227..652d036150f7ec9f0604ffd2b3c099caad444421 100644 (file)
@@ -143,7 +143,7 @@ class SpamCheck
   end
 
   def trusted?
-    @account.trust_level > Account::TRUST_LEVELS[:untrusted]
+    @account.trust_level > Account::TRUST_LEVELS[:untrusted] || (@account.local? && @account.user_staff?)
   end
 
   def no_unsolicited_mentions?