Chore: Add additional information to conversation meta (#795)

Chore: Add additional information to conversation meta
This commit is contained in:
Sojan Jose 2020-05-01 16:49:28 +05:30 committed by GitHub
parent 96da27f1f6
commit d4ff9f5b45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -1,7 +1,9 @@
json.meta do json.meta do
json.labels @conversation.label_list json.labels @conversation.label_list
json.additional_attributes @conversation.additional_attributes json.additional_attributes @conversation.additional_attributes
json.contact_id @conversation.contact_id json.contact @conversation.contact.push_event_data
json.assignee @conversation.assignee.push_event_data if @conversation.assignee.present?
json.agent_last_seen_at @conversation.agent_last_seen_at
end end
json.payload do json.payload do

View file

@ -116,7 +116,7 @@ RSpec.describe 'Conversation Messages API', type: :request do
as: :json as: :json
expect(response).to have_http_status(:success) expect(response).to have_http_status(:success)
expect(JSON.parse(response.body, symbolize_names: true)[:meta][:contact_id]).to eq(conversation.contact_id) expect(JSON.parse(response.body, symbolize_names: true)[:meta][:contact][:id]).to eq(conversation.contact_id)
end end
end end
end end