2020-04-21 11:21:10 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Spam
|
|
|
|
module SpamConstants
|
2022-09-07 02:13:04 -04:00
|
|
|
ERROR_TYPE = 'spamcheck'
|
2022-03-01 19:13:45 -05:00
|
|
|
BLOCK_USER = 'block'
|
|
|
|
DISALLOW = 'disallow'
|
|
|
|
CONDITIONAL_ALLOW = 'conditional_allow'
|
|
|
|
OVERRIDE_VIA_ALLOW_POSSIBLE_SPAM = 'override_via_allow_possible_spam'
|
|
|
|
ALLOW = 'allow'
|
|
|
|
NOOP = 'noop'
|
2020-05-22 05:08:09 -04:00
|
|
|
|
|
|
|
SUPPORTED_VERDICTS = {
|
|
|
|
BLOCK_USER => {
|
|
|
|
priority: 1
|
|
|
|
},
|
|
|
|
DISALLOW => {
|
|
|
|
priority: 2
|
|
|
|
},
|
2020-05-25 23:08:02 -04:00
|
|
|
CONDITIONAL_ALLOW => {
|
2020-05-22 05:08:09 -04:00
|
|
|
priority: 3
|
|
|
|
},
|
2022-03-01 19:13:45 -05:00
|
|
|
OVERRIDE_VIA_ALLOW_POSSIBLE_SPAM => {
|
2020-05-22 05:08:09 -04:00
|
|
|
priority: 4
|
2021-05-06 20:10:27 -04:00
|
|
|
},
|
2022-03-01 19:13:45 -05:00
|
|
|
ALLOW => {
|
2021-05-06 20:10:27 -04:00
|
|
|
priority: 5
|
2022-03-01 19:13:45 -05:00
|
|
|
},
|
|
|
|
NOOP => {
|
|
|
|
priority: 6
|
2020-05-22 05:08:09 -04:00
|
|
|
}
|
|
|
|
}.freeze
|
2020-04-21 11:21:10 -04:00
|
|
|
end
|
|
|
|
end
|