Skip to content

Commit

Permalink
Merge branch 'develop' into epic/CV2-4441-articles
Browse files Browse the repository at this point in the history
  • Loading branch information
caiosba committed Jul 8, 2024
2 parents 28b1283 + 9971f81 commit 86e2d2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 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 All @@ -307,6 +307,7 @@ def bundle_list_of_messages_to_items(list, last)
# No messages exist (this happens when all messages are short text)
# So will create a new message of type text and assign short text to it
message = last.clone
message['type'] = 'text'
message['text'] = all_text
messages << message
else
Expand Down

0 comments on commit 86e2d2e

Please sign in to comment.