Move require_relative lines into the initializer
This commit is contained in:
parent
9d91081f0c
commit
964fb07c50
|
@ -22,3 +22,23 @@ module ::DiscourseChat
|
|||
PluginStore.remove(self.plugin_name, key)
|
||||
end
|
||||
end
|
||||
|
||||
require_relative "../models/plugin_model"
|
||||
require_relative "../models/rule"
|
||||
require_relative "../models/channel"
|
||||
|
||||
require_relative "../serializers/channel_serializer"
|
||||
require_relative "../serializers/rule_serializer"
|
||||
|
||||
require_relative "../controllers/chat_controller"
|
||||
|
||||
require_relative "../routes/discourse_chat"
|
||||
require_relative "../routes/discourse"
|
||||
|
||||
require_relative "../helpers/helper"
|
||||
|
||||
require_relative "../services/manager"
|
||||
|
||||
require_relative "../jobs/regular/notify_chats"
|
||||
|
||||
require_relative "../../lib/discourse_chat/provider"
|
20
plugin.rb
20
plugin.rb
|
@ -15,26 +15,6 @@ after_initialize do
|
|||
|
||||
require_relative "app/initializers/discourse_chat"
|
||||
|
||||
require_relative "app/models/plugin_model"
|
||||
require_relative "app/models/rule"
|
||||
require_relative "app/models/channel"
|
||||
|
||||
require_relative "app/serializers/channel_serializer"
|
||||
require_relative "app/serializers/rule_serializer"
|
||||
|
||||
require_relative "app/controllers/chat_controller"
|
||||
|
||||
require_relative "app/routes/discourse_chat"
|
||||
require_relative "app/routes/discourse"
|
||||
|
||||
require_relative "app/helpers/helper"
|
||||
|
||||
require_relative "app/services/manager"
|
||||
|
||||
require_relative "app/jobs/regular/notify_chats"
|
||||
|
||||
require_relative "lib/discourse_chat/provider"
|
||||
|
||||
DiscourseEvent.on(:post_created) do |post|
|
||||
if SiteSetting.chat_integration_enabled?
|
||||
# This will run for every post, even PMs. Don't worry, they're filtered out later.
|
||||
|
|
Loading…
Reference in New Issue