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:
Blake Erickson
2022-08-29 13:05:41 -06:00
committed by GitHub
parent e16c8ea2e7
commit eba8b8d34d
6 changed files with 24 additions and 56 deletions

View File

@ -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