chore: Fix Twilio file uploads (#2088)
This commit is contained in:
parent
04a9dc630a
commit
c4ae901591
1 changed files with 3 additions and 1 deletions
|
@ -148,7 +148,9 @@ class Message < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def send_reply
|
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
|
end
|
||||||
|
|
||||||
def reopen_conversation
|
def reopen_conversation
|
||||||
|
|
Loading…
Reference in a new issue