mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
FEATURE: Replace Lounge with General Category (#18097)
- Seed the General category so that the general chat channel will have a home - Do not seed the Lounge category anymore - Move the "Welcome to Site" topic to the General category
This commit is contained in:
@ -85,24 +85,14 @@ module SeedData
|
||||
|
||||
if include_welcome_topics
|
||||
# Welcome Topic
|
||||
topics << {
|
||||
site_setting_name: 'welcome_topic_id',
|
||||
title: I18n.t('discourse_welcome_topic.title'),
|
||||
raw: I18n.t('discourse_welcome_topic.body', base_path: Discourse.base_path),
|
||||
after_create: proc do |post|
|
||||
post.topic.update_pinned(true, true)
|
||||
end
|
||||
}
|
||||
|
||||
# Lounge Welcome Topic
|
||||
if lounge_category = Category.find_by(id: SiteSetting.lounge_category_id)
|
||||
if general_category = Category.find_by(id: SiteSetting.general_category_id)
|
||||
topics << {
|
||||
site_setting_name: 'lounge_welcome_topic_id',
|
||||
title: I18n.t('lounge_welcome.title'),
|
||||
raw: I18n.t('lounge_welcome.body', base_path: Discourse.base_path),
|
||||
category: lounge_category,
|
||||
site_setting_name: 'welcome_topic_id',
|
||||
title: I18n.t('discourse_welcome_topic.title'),
|
||||
raw: I18n.t('discourse_welcome_topic.body', base_path: Discourse.base_path),
|
||||
category: general_category,
|
||||
after_create: proc do |post|
|
||||
post.topic.update_pinned(true)
|
||||
post.topic.update_pinned(true, true)
|
||||
end
|
||||
}
|
||||
end
|
||||
|
Reference in New Issue
Block a user