feat: API to list all attachments for a conversation (#7059)

Fixes: https://linear.app/chatwoot/issue/CW-1678/api-to-list-all-attachments-for-a-conversation
This commit is contained in:
Muhsin Keloth
2023-05-12 15:48:06 +05:30
committed by GitHub
parent 708bddf4db
commit 2c3160cfee
6 changed files with 63 additions and 0 deletions

View File

@@ -22,6 +22,10 @@ class Api::V1::Accounts::ConversationsController < Api::V1::Accounts::BaseContro
@conversations_count = result[:count]
end
def attachments
@attachments = @conversation.attachments
end
def create
ActiveRecord::Base.transaction do
@conversation = ConversationBuilder.new(params: params, contact_inbox: @contact_inbox).perform