Move require_relative lines into the initializer
This commit is contained in:
parent
9d91081f0c
commit
964fb07c50
|
@ -21,4 +21,24 @@ module ::DiscourseChat
|
||||||
def self.pstore_delete(key)
|
def self.pstore_delete(key)
|
||||||
PluginStore.remove(self.plugin_name, key)
|
PluginStore.remove(self.plugin_name, key)
|
||||||
end
|
end
|
||||||
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
|
@ -14,26 +14,6 @@ require_relative "lib/discourse_chat/provider/slack/slack_enabled_setting_valida
|
||||||
after_initialize do
|
after_initialize do
|
||||||
|
|
||||||
require_relative "app/initializers/discourse_chat"
|
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|
|
DiscourseEvent.on(:post_created) do |post|
|
||||||
if SiteSetting.chat_integration_enabled?
|
if SiteSetting.chat_integration_enabled?
|
||||||
|
|
Loading…
Reference in New Issue