diff --git a/app/lib/util/slack_notifiable.rb b/app/lib/util/slack_notifiable.rb index e0c8b59..88b8f87 100644 --- a/app/lib/util/slack_notifiable.rb +++ b/app/lib/util/slack_notifiable.rb @@ -197,6 +197,27 @@ def standard_video_course_fields(video_course:) ] end + def standard_content_module_fields(content_module:) + [ + { + type: 'mrkdwn', + text: "*Content Module*\n#{content_module&.title || '_unknown_'}" + }, + { + type: 'mrkdwn', + text: "*Short Code*\n`#{content_module&.shortcode || 'unknown'}`" + }, + { + type: 'mrkdwn', + text: "*Version*\n#{content_module&.version || '_unknown_'}" + }, + { + type: 'mrkdwn', + text: "*Environment*\n`#{ENVIRONMENT}`" + } + ] + end + def intro_section(fields:, message:, image_url:, alt_text:) { type: 'section',