From 84ae13eb6b2296c778a80c963da8f095defad936 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Wed, 23 Oct 2024 16:57:54 +0200 Subject: [PATCH] fix(helpscout): don't create conversation with an empty attachment --- app/jobs/helpscout_create_conversation_job.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/jobs/helpscout_create_conversation_job.rb b/app/jobs/helpscout_create_conversation_job.rb index f18781d53..85dda42a0 100644 --- a/app/jobs/helpscout_create_conversation_job.rb +++ b/app/jobs/helpscout_create_conversation_job.rb @@ -49,6 +49,7 @@ class HelpscoutCreateConversationJob < ApplicationJob def safe_blob return if !contact_form.piece_jointe.virus_scanner&.safe? + return if contact_form.piece_jointe.byte_size.zero? # HS don't support empty attachment contact_form.piece_jointe end