Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Commit

Permalink
Merge pull request #72 from onetwotrip/Fallback
Browse files Browse the repository at this point in the history
Use fallback for attachments, where text is not avaliable
  • Loading branch information
jimmycuadra committed Dec 31, 2015
2 parents b01c073 + 10bc51a commit 1340045
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/lita/adapters/slack/message_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def body
normalized_message = remove_formatting(normalized_message) unless normalized_message.nil?

attachment_text = Array(data["attachments"]).map do |attachment|
attachment["text"]
attachment["text"] || attachment["fallback"]
end

([normalized_message] + attachment_text).compact.join("\n")
Expand Down

0 comments on commit 1340045

Please sign in to comment.