feat: Adds API for retry messages in conversation (#8518)

This commit is contained in:
Sivin Varghese
2023-12-11 09:33:39 +05:30
committed by GitHub
parent 80ff5e2d0a
commit 27239ae14a
4 changed files with 56 additions and 0 deletions

View File

@@ -18,6 +18,15 @@ class Api::V1::Accounts::Conversations::MessagesController < Api::V1::Accounts::
end
end
def retry
return if message.blank?
message.update!(status: :sent, content_attributes: {})
::SendReplyJob.perform_later(message.id)
rescue StandardError => e
render_could_not_create_error(e.message)
end
def translate
return head :ok if already_translated_content_available?