mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 07:23:40 +08:00
2bb740cb16
There was a bug report on meta that after deployment, some topics were not loaded properly for 24 hours - https://meta.discourse.org/t/endless-spinner-on-some-posts/323031/17 In this PR we moved the `like` post action type to the database - https://github.com/discourse/discourse/pull/28362 However, flags are cached for performance reasons https://github.com/discourse/discourse/blob/main/app/serializers/site_serializer.rb#L113 After seed, we should ensure that the cache is reset so the site has access to all post-action types.
79 lines
1.8 KiB
Ruby
79 lines
1.8 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]
|
|
s.skip_reset_flag_callback = true
|
|
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]
|
|
s.skip_reset_flag_callback = true
|
|
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]
|
|
s.skip_reset_flag_callback = true
|
|
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]
|
|
s.skip_reset_flag_callback = true
|
|
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]
|
|
s.skip_reset_flag_callback = true
|
|
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]
|
|
s.skip_reset_flag_callback = true
|
|
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[]
|
|
s.skip_reset_flag_callback = true
|
|
end
|
|
Flag.unscoped.seed do |s|
|
|
s.id = 2
|
|
s.name = "like"
|
|
s.notify_type = false
|
|
s.auto_action_type = false
|
|
s.require_message = false
|
|
s.score_type = false
|
|
s.applies_to = %w[Post]
|
|
s.skip_reset_flag_callback = true
|
|
end
|
|
|
|
Flag.reset_flag_settings!
|