fix(helpscout): don't create conversation with an empty attachment

This commit is contained in:
Colin Darie 2024-10-23 16:57:54 +02:00
parent 1b188f65b0
commit 84ae13eb6b
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4

View file

@ -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