mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 11:55:24 +08:00
c975c7fe1b
Allow admin to create custom flag which requires an additional message. I decided to rename the old `custom_flag` into `require_message` as it is more descriptive.
60 lines
1.3 KiB
Ruby
60 lines
1.3 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
Flag.seed do |s|
|
|
s.id = 6
|
|
s.name = "notify_user"
|
|
s.notify_type = false
|
|
s.auto_action_type = false
|
|
s.require_message = true
|
|
s.applies_to = %w[Post Chat::Message]
|
|
end
|
|
Flag.seed do |s|
|
|
s.id = 3
|
|
s.name = "off_topic"
|
|
s.notify_type = true
|
|
s.auto_action_type = true
|
|
s.require_message = false
|
|
s.applies_to = %w[Post Chat::Message]
|
|
end
|
|
Flag.seed do |s|
|
|
s.id = 4
|
|
s.name = "inappropriate"
|
|
s.notify_type = true
|
|
s.auto_action_type = true
|
|
s.require_message = false
|
|
s.applies_to = %w[Post Topic Chat::Message]
|
|
end
|
|
Flag.seed do |s|
|
|
s.id = 8
|
|
s.name = "spam"
|
|
s.notify_type = true
|
|
s.auto_action_type = true
|
|
s.require_message = false
|
|
s.applies_to = %w[Post Topic Chat::Message]
|
|
end
|
|
Flag.seed do |s|
|
|
s.id = 10
|
|
s.name = "illegal"
|
|
s.notify_type = true
|
|
s.auto_action_type = false
|
|
s.require_message = true
|
|
s.applies_to = %w[Post Topic Chat::Message]
|
|
end
|
|
Flag.seed do |s|
|
|
s.id = 7
|
|
s.name = "notify_moderators"
|
|
s.notify_type = true
|
|
s.auto_action_type = false
|
|
s.require_message = true
|
|
s.applies_to = %w[Post Topic Chat::Message]
|
|
end
|
|
Flag.unscoped.seed do |s|
|
|
s.id = 9
|
|
s.name = "needs_approval"
|
|
s.notify_type = false
|
|
s.auto_action_type = false
|
|
s.require_message = false
|
|
s.score_type = true
|
|
s.applies_to = %w[]
|
|
end
|