Skip to content

Commit

Permalink
Include fact-check body in report when URL is blank for Messenger
Browse files Browse the repository at this point in the history
Fixes CV2-4846
  • Loading branch information
computermacgyver authored Jul 2, 2024
1 parent cbb1f54 commit 00af91a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/concerns/smooch_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def send_search_results_to_user(uid, results, team_id, platform)
end
reports.reject{ |r| r.blank? }.each do |report|
response = nil
no_body = (platform == 'Facebook Messenger')
no_body = (platform == 'Facebook Messenger' && !report_design_field_value('published_article_url').blank?)
response = self.send_message_to_user(uid, report.report_design_text(nil, no_body), {}, false, true, 'search_result') if report.report_design_field_value('use_text_message')
response = self.send_message_to_user(uid, '', { 'type' => 'image', 'mediaUrl' => report.report_design_image_url }, false, true, 'search_result') if !report.report_design_field_value('use_text_message') && report.report_design_field_value('use_visual_card')
id = self.get_id_from_send_response(response)
Expand Down

0 comments on commit 00af91a

Please sign in to comment.