mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 07:37:55 +08:00
FEATURE: new setting to create a linked topic on autoclosing mega topics (#11001)
This commit adds a site setting `auto_close_topics_create_linked_topic` which when enabled works in conjunction with `auto_close_topics_post_count` setting and creates a new linked topic for the topic just closed. The auto-created new topic contains a link for all the previous topics and the topic titles are appended with `(Part {n})`. The setting is enabled by default.
This commit is contained in:
@ -381,6 +381,11 @@ class PostCreator
|
||||
locale: SiteSetting.default_locale
|
||||
)
|
||||
)
|
||||
|
||||
if SiteSetting.auto_close_topics_create_linked_topic?
|
||||
# enqueue a job to create a linked topic
|
||||
Jobs.enqueue_in(5.seconds, :create_linked_topic, post_id: @post.id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user