mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
DEV: Move discourse-chat
to the core repo. (#18776)
As part of this move, we are also renaming `discourse-chat` to `chat`.
This commit is contained in:
23
plugins/chat/lib/tasks/chat.rake
Normal file
23
plugins/chat/lib/tasks/chat.rake
Normal file
@ -0,0 +1,23 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
if Discourse.allow_dev_populate?
|
||||
chat_task = Rake::Task["dev:populate"]
|
||||
chat_task.enhance do
|
||||
SiteSetting.chat_enabled = true
|
||||
DiscourseDev::PublicChannel.populate!
|
||||
DiscourseDev::DirectChannel.populate!
|
||||
DiscourseDev::Message.populate!
|
||||
end
|
||||
|
||||
desc "Generates sample content for chat"
|
||||
task "chat:populate" => ["db:load_config"] do |_, args|
|
||||
DiscourseDev::PublicChannel.new.populate!(ignore_current_count: true)
|
||||
DiscourseDev::DirectChannel.new.populate!(ignore_current_count: true)
|
||||
DiscourseDev::Message.new.populate!(ignore_current_count: true)
|
||||
end
|
||||
|
||||
desc "Generates sample messages in channels"
|
||||
task "chat:message:populate" => ["db:load_config"] do |_, args|
|
||||
DiscourseDev::Message.new.populate!(ignore_current_count: true)
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user