Skip to content

Commit

Permalink
CV2-4696: make sure the mediaUrl exists for media files (#1946)
Browse files Browse the repository at this point in the history
  • Loading branch information
melsawy authored Jul 7, 2024
1 parent 9e4c452 commit 5ea1fb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/concerns/smooch_messages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def bundle_list_of_messages_to_items(list, last)
messages << message if ::Bot::Alegre.get_number_of_words(message['text'].to_s) > CheckConfig.get('min_number_of_words_for_tipline_submit_shortcut', 10, :integer)
text << message['text']
end
else
elsif !message['mediaUrl'].blank?
# Get an item for each media file
message['text'] = [message['text'], message['mediaUrl'].to_s].compact.join("\n#{Bot::Smooch::MESSAGE_BOUNDARY}")
text << message['text']
Expand Down

0 comments on commit 5ea1fb1

Please sign in to comment.