diff --git a/Gemfile.lock b/Gemfile.lock index de348a2b5..1bd5f4f05 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -467,7 +467,7 @@ GEM mini_magick (4.12.0) mini_mime (1.1.5) mini_portile2 (2.8.7) - minitest (5.24.1) + minitest (5.25.1) mock_redis (0.36.0) ruby2_keywords msgpack (1.7.0) @@ -480,7 +480,7 @@ GEM uri net-http-persistent (4.0.2) connection_pool (~> 2.2) - net-imap (0.4.12) + net-imap (0.4.14) date net-protocol net-pop (0.1.2) @@ -796,7 +796,7 @@ GEM uniform_notifier (1.16.0) uri (0.13.0) uri_template (0.7.0) - valid_email2 (4.0.6) + valid_email2 (5.2.6) activemodel (>= 3.2) mail (~> 2.5) version_gem (1.1.4) diff --git a/app/builders/account_builder.rb b/app/builders/account_builder.rb index f179c6405..a3a90451d 100644 --- a/app/builders/account_builder.rb +++ b/app/builders/account_builder.rb @@ -33,10 +33,10 @@ class AccountBuilder def validate_email address = ValidEmail2::Address.new(@email) - if address.valid? # && !address.disposable? + if address.valid? && !address.disposable? true else - raise InvalidEmail.new(valid: address.valid?) + raise InvalidEmail.new({ valid: address.valid?, disposable: address.disposable? }) end end diff --git a/app/controllers/api/v1/accounts/integrations/hooks_controller.rb b/app/controllers/api/v1/accounts/integrations/hooks_controller.rb index d09ea2f00..13bb2738b 100644 --- a/app/controllers/api/v1/accounts/integrations/hooks_controller.rb +++ b/app/controllers/api/v1/accounts/integrations/hooks_controller.rb @@ -11,7 +11,12 @@ class Api::V1::Accounts::Integrations::HooksController < Api::V1::Accounts::Base end def process_event - render json: { message: @hook.process_event(params[:event]) } + response = @hook.process_event(params[:event]) + if response[:error] + render json: { error: response[:error] }, status: :unprocessable_entity + else + render json: { message: response[:message] } + end end def destroy diff --git a/app/javascript/dashboard/components/ChatList.vue b/app/javascript/dashboard/components/ChatList.vue index fa95c5024..476fc7438 100644 --- a/app/javascript/dashboard/components/ChatList.vue +++ b/app/javascript/dashboard/components/ChatList.vue @@ -141,7 +141,7 @@ export default { allowOnFocusedInput: true, }, }; - useKeyboardEvents(keyboardEvents, conversationListRef); + useKeyboardEvents(keyboardEvents); return { uiSettings, diff --git a/app/javascript/dashboard/components/buttons/ResolveAction.vue b/app/javascript/dashboard/components/buttons/ResolveAction.vue index 7c4c4daaa..0626ced59 100644 --- a/app/javascript/dashboard/components/buttons/ResolveAction.vue +++ b/app/javascript/dashboard/components/buttons/ResolveAction.vue @@ -19,7 +19,6 @@ const store = useStore(); const getters = useStoreGetters(); const { t } = useI18n(); -const resolveActionsRef = ref(null); const arrowDownButtonRef = ref(null); const isLoading = ref(false); @@ -131,17 +130,14 @@ const keyboardEvents = { }, }; -useKeyboardEvents(keyboardEvents, resolveActionsRef); +useKeyboardEvents(keyboardEvents); useEmitter(CMD_REOPEN_CONVERSATION, onCmdOpenConversation); useEmitter(CMD_RESOLVE_CONVERSATION, onCmdResolveConversation);