Merge branch 'feat/whatsapp-call-meta-bridge' into feat/whatsapp-call-ui
This commit is contained in:
@@ -134,7 +134,10 @@ class Api::V1::Accounts::WhatsappCallsController < Api::V1::Accounts::BaseContro
|
||||
|
||||
return render_could_not_create_error(I18n.t('errors.whatsapp.calls.permission_request_failed')) if status == 'failed'
|
||||
|
||||
render json: { status: status }
|
||||
# 422 (not 200) so any client treating 2xx as "call placed" can't mistake
|
||||
# the permission-template path for a successful dial. The FE composable
|
||||
# detects this status and surfaces the banner instead of throwing.
|
||||
render json: { status: status }, status: :unprocessable_entity
|
||||
end
|
||||
|
||||
def permission_request_throttled?
|
||||
|
||||
@@ -14,8 +14,10 @@ module Enterprise::Concerns::Attachment
|
||||
|
||||
def enqueue_audio_transcription
|
||||
return unless file_type.to_sym == :audio
|
||||
return unless file.attached?
|
||||
|
||||
# No file.attached? guard: the social-media ingest path saves the
|
||||
# Attachment before attaching the blob. AudioTranscriptionJob retries
|
||||
# on ActiveStorage::FileNotFoundError to ride out that race.
|
||||
Messages::AudioTranscriptionJob.perform_later(id)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user