From 7b42d688999ac37cddae98155d01f4e4bcc8d977 Mon Sep 17 00:00:00 2001 From: Caio Almeida <117518+caiosba@users.noreply.github.com> Date: Thu, 7 Mar 2024 09:47:33 -0300 Subject: [PATCH] Replace item by parent when sending tipline keyword search results. (#1821) Fixes CV2-4071. --- app/models/concerns/smooch_search.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/concerns/smooch_search.rb b/app/models/concerns/smooch_search.rb index dce02fe785..171aecf5d8 100644 --- a/app/models/concerns/smooch_search.rb +++ b/app/models/concerns/smooch_search.rb @@ -15,7 +15,7 @@ def search(app_id, uid, language, message, team_id, workflow, provider = nil) pm = Relationship.confirmed_parent(pm) report = pm.get_dynamic_annotation('report_design') !report.nil? && !!report.should_send_report_in_this_language?(language) - end.uniq + end.collect{ |pm| Relationship.confirmed_parent(pm) }.uniq if results.empty? self.bundle_messages(uid, '', app_id, 'default_requests', nil, true) self.send_final_message_to_user(uid, self.get_custom_string('search_no_results', language), workflow, language, 'no_results')