diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-04-03 20:16:24 +0300 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-04-05 15:57:11 +0300 |
commit | 9bfa0a5ffab279f25c52f2e1e9644616168bf994 (patch) | |
tree | db0dbd9254858dc13c29b1e8bfdab167ac711b6a /lib | |
parent | 7dd645e6c97dcc1dfeea4c0ad46ec1feabc87173 (diff) |
adds remaining messages
Diffstat (limited to 'lib')
-rw-r--r-- | lib/microsoft_teams/notifier.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/microsoft_teams/notifier.rb b/lib/microsoft_teams/notifier.rb index deff5fd26ee..8e422575636 100644 --- a/lib/microsoft_teams/notifier.rb +++ b/lib/microsoft_teams/notifier.rb @@ -25,7 +25,10 @@ module MicrosoftTeams 'activityText' => options[:activity][:text], 'activityImage' => options[:activity][:image] } - result['sections'] << { 'title' => 'Details', 'facts' => attachments(options[:attachments]) } if options[:attachments] + + if options[:attachments].present? && !options[:attachments].empty? + result['sections'] << { 'title' => 'Details', 'facts' => attachments(options[:attachments]) } + end result.to_json end |