Chore: Add additional information to conversation meta (#795)
Chore: Add additional information to conversation meta
This commit is contained in:
parent
96da27f1f6
commit
d4ff9f5b45
2 changed files with 4 additions and 2 deletions
|
@ -1,7 +1,9 @@
|
|||
json.meta do
|
||||
json.labels @conversation.label_list
|
||||
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
|
||||
|
||||
json.payload do
|
||||
|
|
|
@ -116,7 +116,7 @@ RSpec.describe 'Conversation Messages API', type: :request do
|
|||
as: :json
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue