* Add: フォローしていないアカウントからのリプライのNGワード * Test: ハッシュタグ使用量
This commit is contained in:
parent
da662d2f84
commit
3a2030dfc8
8 changed files with 223 additions and 5 deletions
|
@ -18,6 +18,10 @@ class Admin::NgWord
|
|||
hashtag_reject?(Extractor.extract_hashtags(text)&.size || 0)
|
||||
end
|
||||
|
||||
def stranger_mention_reject?(text)
|
||||
ng_words_for_stranger_mention.any? { |word| include?(text, word) }
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def include?(text, word)
|
||||
|
@ -32,6 +36,10 @@ class Admin::NgWord
|
|||
Setting.ng_words || []
|
||||
end
|
||||
|
||||
def ng_words_for_stranger_mention
|
||||
Setting.ng_words_for_stranger_mention || []
|
||||
end
|
||||
|
||||
def post_hash_tags_max
|
||||
value = Setting.post_hash_tags_max
|
||||
value.is_a?(Integer) && value.positive? ? value : 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue