From 888d3cb3fa23b4697c45390ea8c2df031ee89781 Mon Sep 17 00:00:00 2001 From: Pranav Date: Wed, 17 Apr 2024 16:59:38 -0700 Subject: [PATCH 01/93] chore: Increase the rate limit for contact search (#9256) --- config/initializers/rack_attack.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/rack_attack.rb b/config/initializers/rack_attack.rb index 440fc43cb..4b2831ca5 100644 --- a/config/initializers/rack_attack.rb +++ b/config/initializers/rack_attack.rb @@ -149,7 +149,7 @@ class Rack::Attack end ## Prevent abuse of contact search api - throttle('/api/v1/accounts/:account_id/contacts/search', limit: 5, period: 1.minute) do |req| + throttle('/api/v1/accounts/:account_id/contacts/search', limit: ENV.fetch('RATE_LIMIT_CONTACT_SEARCH', '100').to_i, period: 1.minute) do |req| match_data = %r{/api/v1/accounts/(?\d+)/contacts/search}.match(req.path) match_data[:account_id] if match_data.present? end From ca2fa5ff065a6c9cc0fbe045dc8831d785830789 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Thu, 18 Apr 2024 12:31:32 +0530 Subject: [PATCH 02/93] fix: Clicking on contact attributes doesn't do anything if contact attributes list is empty (#9257) * fix: Clicking on contact attributes doesn't do anything if contact attributes list is empty * Update app/javascript/dashboard/i18n/locale/en/conversation.json Co-authored-by: Muhsin Keloth * Update app/javascript/dashboard/i18n/locale/en/contact.json Co-authored-by: Muhsin Keloth --------- Co-authored-by: Muhsin Keloth --- app/javascript/dashboard/i18n/locale/en/contact.json | 3 ++- .../dashboard/i18n/locale/en/conversation.json | 1 + .../dashboard/contacts/components/ContactInfoPanel.vue | 5 ++++- .../routes/dashboard/conversation/ContactPanel.vue | 5 ++++- .../conversation/customAttributes/CustomAttributes.vue | 10 ++++++++++ 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/app/javascript/dashboard/i18n/locale/en/contact.json b/app/javascript/dashboard/i18n/locale/en/contact.json index 24483ca1a..ebd2556e4 100644 --- a/app/javascript/dashboard/i18n/locale/en/contact.json +++ b/app/javascript/dashboard/i18n/locale/en/contact.json @@ -48,7 +48,8 @@ "SIDEBAR_SECTIONS": { "CUSTOM_ATTRIBUTES": "Custom Attributes", "CONTACT_LABELS": "Contact Labels", - "PREVIOUS_CONVERSATIONS": "Previous Conversations" + "PREVIOUS_CONVERSATIONS": "Previous Conversations", + "NO_RECORDS_FOUND": "No attributes found" } }, "EDIT_CONTACT": { diff --git a/app/javascript/dashboard/i18n/locale/en/conversation.json b/app/javascript/dashboard/i18n/locale/en/conversation.json index d6ea8f83d..742a3657e 100644 --- a/app/javascript/dashboard/i18n/locale/en/conversation.json +++ b/app/javascript/dashboard/i18n/locale/en/conversation.json @@ -280,6 +280,7 @@ }, "CONVERSATION_CUSTOM_ATTRIBUTES": { "ADD_BUTTON_TEXT": "Create attribute", + "NO_RECORDS_FOUND": "No attributes found", "UPDATE": { "SUCCESS": "Attribute updated successfully", "ERROR": "Unable to update attribute. Please try again later" diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactInfoPanel.vue b/app/javascript/dashboard/routes/dashboard/contacts/components/ContactInfoPanel.vue index c7bc915b5..01a790194 100644 --- a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactInfoPanel.vue +++ b/app/javascript/dashboard/routes/dashboard/contacts/components/ContactInfoPanel.vue @@ -1,6 +1,6 @@