diff --git a/app/initializers/discourse_chat.rb b/app/initializers/discourse_chat.rb index 4c77bed..59cd785 100644 --- a/app/initializers/discourse_chat.rb +++ b/app/initializers/discourse_chat.rb @@ -21,4 +21,24 @@ module ::DiscourseChat def self.pstore_delete(key) PluginStore.remove(self.plugin_name, key) end -end \ No newline at end of file +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" \ No newline at end of file diff --git a/plugin.rb b/plugin.rb index f9580fd..fb6f6ad 100644 --- a/plugin.rb +++ b/plugin.rb @@ -14,26 +14,6 @@ require_relative "lib/discourse_chat/provider/slack/slack_enabled_setting_valida 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?