Class: Message::MessageCard

Inherits:
Type
  • Object
show all
Defined in:
lib/capistrano/teams/message/types.rb

Overview

MessageCard type

Instance Method Summary collapse

Methods inherited from Type

#initialize, #placeholders

Constructor Details

This class inherits a constructor from Message::Type

Instance Method Details

#contentObject

Get the body of the POST message as JSON.



54
55
56
57
58
59
60
61
62
63
# File 'lib/capistrano/teams/message/types.rb', line 54

def content
  {
    '@type' => 'MessageCard',
    '@context' => 'http://schema.org/extensions',
    'themeColor' => @theme_color,
    'summary' => fetch(:teams_card_message_summary),
    'sections' => sections,
    'potentialAction' => []
  }.to_json % placeholders
end