feat (perf): Remove conversation count in contacts list view (#7915)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Vishnu Narayanan
2023-09-14 08:49:37 +05:30
committed by GitHub
parent 18e9e771b5
commit 5e6e234afe
3 changed files with 11 additions and 22 deletions

View File

@@ -87,7 +87,7 @@ RSpec.describe 'Contacts API', type: :request do
expect(response_body['payload'].last['email']).to eq(contact_4.email)
end
it 'returns includes conversations count and last seen at' do
it 'returns last seen at' do
create(:conversation, contact: contact, account: account, inbox: contact_inbox.inbox, contact_last_seen_at: Time.now.utc)
get "/api/v1/accounts/#{account.id}/contacts",
headers: admin.create_new_auth_token,
@@ -95,7 +95,6 @@ RSpec.describe 'Contacts API', type: :request do
expect(response).to have_http_status(:success)
response_body = response.parsed_body
expect(response_body['payload'].first['conversations_count']).to eq(contact.conversations.count)
expect(response_body['payload'].first['last_seen_at']).present?
end