diff --git a/app/models/message.rb b/app/models/message.rb index 064441e3b..8c834e2ed 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -148,7 +148,9 @@ class Message < ApplicationRecord end def send_reply - ::SendReplyJob.perform_later(id) + # FIXME: Giving it few seconds for the attachment to be uploaded to the service + # active storage attaches the file only after commit + attachments.blank? ? ::SendReplyJob.perform_later(id) : ::SendReplyJob.set(wait: 2.seconds).perform_later(id) end def reopen_conversation