From 8c1c1a5ab2ebdfafc1b731e30cff96db5e19c6b1 Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Wed, 16 Aug 2023 15:47:35 +0530 Subject: [PATCH] chore: move lib to services --- {lib => app/services}/integrations/bot_processor_service.rb | 0 {lib => app/services}/integrations/csml/processor_service.rb | 0 .../services}/integrations/dialogflow/processor_service.rb | 0 {lib => app/services}/integrations/dyte/processor_service.rb | 0 .../services}/integrations/facebook/delivery_status.rb | 0 .../services}/integrations/facebook/message_creator.rb | 0 {lib => app/services}/integrations/facebook/message_parser.rb | 0 .../integrations/google_translate/detect_language_service.rb | 0 .../integrations/google_translate/processor_service.rb | 0 .../services}/integrations/openai/openai_prompts/reply.txt | 0 .../services}/integrations/openai/openai_prompts/summary.txt | 0 .../services}/integrations/openai/processor_service.rb | 0 {lib => app/services}/integrations/openai_base_service.rb | 0 {lib => app/services}/integrations/slack/channel_builder.rb | 0 {lib => app/services}/integrations/slack/hook_builder.rb | 0 .../services}/integrations/slack/incoming_message_builder.rb | 4 ++++ .../services}/integrations/slack/send_on_slack_service.rb | 0 .../services}/integrations/widget/incoming_message_builder.rb | 0 .../services}/integrations/widget/outgoing_message_builder.rb | 0 19 files changed, 4 insertions(+) rename {lib => app/services}/integrations/bot_processor_service.rb (100%) rename {lib => app/services}/integrations/csml/processor_service.rb (100%) rename {lib => app/services}/integrations/dialogflow/processor_service.rb (100%) rename {lib => app/services}/integrations/dyte/processor_service.rb (100%) rename {lib => app/services}/integrations/facebook/delivery_status.rb (100%) rename {lib => app/services}/integrations/facebook/message_creator.rb (100%) rename {lib => app/services}/integrations/facebook/message_parser.rb (100%) rename {lib => app/services}/integrations/google_translate/detect_language_service.rb (100%) rename {lib => app/services}/integrations/google_translate/processor_service.rb (100%) rename {lib => app/services}/integrations/openai/openai_prompts/reply.txt (100%) rename {lib => app/services}/integrations/openai/openai_prompts/summary.txt (100%) rename {lib => app/services}/integrations/openai/processor_service.rb (100%) rename {lib => app/services}/integrations/openai_base_service.rb (100%) rename {lib => app/services}/integrations/slack/channel_builder.rb (100%) rename {lib => app/services}/integrations/slack/hook_builder.rb (100%) rename {lib => app/services}/integrations/slack/incoming_message_builder.rb (97%) rename {lib => app/services}/integrations/slack/send_on_slack_service.rb (100%) rename {lib => app/services}/integrations/widget/incoming_message_builder.rb (100%) rename {lib => app/services}/integrations/widget/outgoing_message_builder.rb (100%) diff --git a/lib/integrations/bot_processor_service.rb b/app/services/integrations/bot_processor_service.rb similarity index 100% rename from lib/integrations/bot_processor_service.rb rename to app/services/integrations/bot_processor_service.rb diff --git a/lib/integrations/csml/processor_service.rb b/app/services/integrations/csml/processor_service.rb similarity index 100% rename from lib/integrations/csml/processor_service.rb rename to app/services/integrations/csml/processor_service.rb diff --git a/lib/integrations/dialogflow/processor_service.rb b/app/services/integrations/dialogflow/processor_service.rb similarity index 100% rename from lib/integrations/dialogflow/processor_service.rb rename to app/services/integrations/dialogflow/processor_service.rb diff --git a/lib/integrations/dyte/processor_service.rb b/app/services/integrations/dyte/processor_service.rb similarity index 100% rename from lib/integrations/dyte/processor_service.rb rename to app/services/integrations/dyte/processor_service.rb diff --git a/lib/integrations/facebook/delivery_status.rb b/app/services/integrations/facebook/delivery_status.rb similarity index 100% rename from lib/integrations/facebook/delivery_status.rb rename to app/services/integrations/facebook/delivery_status.rb diff --git a/lib/integrations/facebook/message_creator.rb b/app/services/integrations/facebook/message_creator.rb similarity index 100% rename from lib/integrations/facebook/message_creator.rb rename to app/services/integrations/facebook/message_creator.rb diff --git a/lib/integrations/facebook/message_parser.rb b/app/services/integrations/facebook/message_parser.rb similarity index 100% rename from lib/integrations/facebook/message_parser.rb rename to app/services/integrations/facebook/message_parser.rb diff --git a/lib/integrations/google_translate/detect_language_service.rb b/app/services/integrations/google_translate/detect_language_service.rb similarity index 100% rename from lib/integrations/google_translate/detect_language_service.rb rename to app/services/integrations/google_translate/detect_language_service.rb diff --git a/lib/integrations/google_translate/processor_service.rb b/app/services/integrations/google_translate/processor_service.rb similarity index 100% rename from lib/integrations/google_translate/processor_service.rb rename to app/services/integrations/google_translate/processor_service.rb diff --git a/lib/integrations/openai/openai_prompts/reply.txt b/app/services/integrations/openai/openai_prompts/reply.txt similarity index 100% rename from lib/integrations/openai/openai_prompts/reply.txt rename to app/services/integrations/openai/openai_prompts/reply.txt diff --git a/lib/integrations/openai/openai_prompts/summary.txt b/app/services/integrations/openai/openai_prompts/summary.txt similarity index 100% rename from lib/integrations/openai/openai_prompts/summary.txt rename to app/services/integrations/openai/openai_prompts/summary.txt diff --git a/lib/integrations/openai/processor_service.rb b/app/services/integrations/openai/processor_service.rb similarity index 100% rename from lib/integrations/openai/processor_service.rb rename to app/services/integrations/openai/processor_service.rb diff --git a/lib/integrations/openai_base_service.rb b/app/services/integrations/openai_base_service.rb similarity index 100% rename from lib/integrations/openai_base_service.rb rename to app/services/integrations/openai_base_service.rb diff --git a/lib/integrations/slack/channel_builder.rb b/app/services/integrations/slack/channel_builder.rb similarity index 100% rename from lib/integrations/slack/channel_builder.rb rename to app/services/integrations/slack/channel_builder.rb diff --git a/lib/integrations/slack/hook_builder.rb b/app/services/integrations/slack/hook_builder.rb similarity index 100% rename from lib/integrations/slack/hook_builder.rb rename to app/services/integrations/slack/hook_builder.rb diff --git a/lib/integrations/slack/incoming_message_builder.rb b/app/services/integrations/slack/incoming_message_builder.rb similarity index 97% rename from lib/integrations/slack/incoming_message_builder.rb rename to app/services/integrations/slack/incoming_message_builder.rb index 44d373259..6d0cccad0 100644 --- a/lib/integrations/slack/incoming_message_builder.rb +++ b/app/services/integrations/slack/incoming_message_builder.rb @@ -39,6 +39,10 @@ class Integrations::Slack::IncomingMessageBuilder params[:event][:user].present? && params[:event][:subtype].blank? end + def valid_event_subtype? + params[:event][:subtype].blank? || params[:event][:subtype] == 'file_share' + end + def supported_event? hook_verification? || SUPPORTED_EVENTS.include?(params[:event][:type]) end diff --git a/lib/integrations/slack/send_on_slack_service.rb b/app/services/integrations/slack/send_on_slack_service.rb similarity index 100% rename from lib/integrations/slack/send_on_slack_service.rb rename to app/services/integrations/slack/send_on_slack_service.rb diff --git a/lib/integrations/widget/incoming_message_builder.rb b/app/services/integrations/widget/incoming_message_builder.rb similarity index 100% rename from lib/integrations/widget/incoming_message_builder.rb rename to app/services/integrations/widget/incoming_message_builder.rb diff --git a/lib/integrations/widget/outgoing_message_builder.rb b/app/services/integrations/widget/outgoing_message_builder.rb similarity index 100% rename from lib/integrations/widget/outgoing_message_builder.rb rename to app/services/integrations/widget/outgoing_message_builder.rb