Skip to content

Open-source live-chat, email support, omni-channel desk. An alternative to Intercom, Zendesk, Salesforce Service Cloud etc. 🔥💬

perf: skip loading contact inboxes when dispatching contact merged event (#16317)

Vishnu Narayanan2ffa9bb0883f
diff --git a/app/actions/contact_merge_action.rb b/app/actions/contact_merge_action.rb
index 2c240dd4f78..14c387c7e21 100644
--- a/app/actions/contact_merge_action.rb
+++ b/app/actions/contact_merge_action.rb
@@ -61,8 +61,7 @@ class ContactMergeAction
merged_attributes['contact_type'] = higher_contact_type
@mergee_contact.reload.destroy!
- Rails.configuration.dispatcher.dispatch(CONTACT_MERGED, Time.zone.now, contact: @base_contact,
- tokens: [@base_contact.contact_inboxes.filter_map(&:pubsub_token)])
+ Rails.configuration.dispatcher.dispatch(CONTACT_MERGED, Time.zone.now, contact: @base_contact)
@base_contact.update!(merged_attributes)
end