diff --git a/app/models/pager_tree/integrations/channel/mattermost/v3.rb b/app/models/pager_tree/integrations/channel/mattermost/v3.rb index 847a279..d8c6756 100644 --- a/app/models/pager_tree/integrations/channel/mattermost/v3.rb +++ b/app/models/pager_tree/integrations/channel/mattermost/v3.rb @@ -2,5 +2,9 @@ module PagerTree::Integrations class Channel::Mattermost::V3 < Channel::Slack::V3 # we can just piggy back the Channel::Slack::V3 since Mattermost is a clone of Slack # both integrations have the same exact functionality + + def _alert_created_at_timestamp_formatted + _alert.created_at.utc.iso8601.to_s + end end end diff --git a/app/models/pager_tree/integrations/channel/slack/v3.rb b/app/models/pager_tree/integrations/channel/slack/v3.rb index a859c0e..1286223 100644 --- a/app/models/pager_tree/integrations/channel/slack/v3.rb +++ b/app/models/pager_tree/integrations/channel/slack/v3.rb @@ -68,6 +68,10 @@ def adapter_process_outgoing outgoing_webhook_delivery end + def _alert_created_at_timestamp_formatted + "" + end + private def _alert @@ -99,7 +103,7 @@ def _blocks }, { title: "Created", - value: "", + value: _alert_created_at_timestamp_formatted, short: "true" }, { diff --git a/test/models/pager_tree/integrations/channel/mattermost/v3_test.rb b/test/models/pager_tree/integrations/channel/mattermost/v3_test.rb index 44b3391..0e6f782 100644 --- a/test/models/pager_tree/integrations/channel/mattermost/v3_test.rb +++ b/test/models/pager_tree/integrations/channel/mattermost/v3_test.rb @@ -83,7 +83,7 @@ class Channel::Mattermost::V3Test < ActiveSupport::TestCase }, { title: "Created", - value: "", + value: @alert.created_at.utc.iso8601.to_s, short: "true" }, {