feat(ee): Add transcription support for audio messages (#11670)
<img width="419" alt="Screenshot 2025-06-03 at 4 25 37 PM" src="https://github.com/user-attachments/assets/4b6ddd11-9b91-4981-a571-83746cc4d40b" /> Fixes https://github.com/chatwoot/chatwoot/issues/10182 --------- Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
15
enterprise/app/models/enterprise/concerns/attachment.rb
Normal file
15
enterprise/app/models/enterprise/concerns/attachment.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
module Enterprise::Concerns::Attachment
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
after_create_commit :enqueue_audio_transcription
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def enqueue_audio_transcription
|
||||
return unless file_type.to_sym == :audio
|
||||
|
||||
Messages::AudioTranscriptionJob.perform_later(id)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user