From e1e07d636efd8f03a8bf452d11f1636e0e2002f3 Mon Sep 17 00:00:00 2001 From: Austin Miller <austinrmiller1991@gmail.com> Date: Mon, 23 Dec 2024 12:48:49 -0700 Subject: [PATCH] Fix MS Teams additional datum output format (#127) --- .../pager_tree/integrations/channel/microsoft_teams/v4.rb | 4 ++-- .../integrations/channel/microsoft_teams/v4_test.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/pager_tree/integrations/channel/microsoft_teams/v4.rb b/app/models/pager_tree/integrations/channel/microsoft_teams/v4.rb index 75c8378..d201019 100644 --- a/app/models/pager_tree/integrations/channel/microsoft_teams/v4.rb +++ b/app/models/pager_tree/integrations/channel/microsoft_teams/v4.rb @@ -158,11 +158,11 @@ def _blocks text: _alert.description&.try(:to_plain_text), wrap: true, separator: true, - color: "Light" + maxLines: 24 }, { type: "FactSet", - facts: _alert.additional_data&.map { |ad| {title: ad["label"], value: ad["value"]} } || [], + facts: _alert.additional_data&.map { |ad| {title: ad["label"], value: Array(ad["value"]).join(", ")} } || [], spacing: "Medium", separator: true } diff --git a/test/models/pager_tree/integrations/channel/microsoft_teams/v4_test.rb b/test/models/pager_tree/integrations/channel/microsoft_teams/v4_test.rb index ad8bb3d..cfe6fc5 100644 --- a/test/models/pager_tree/integrations/channel/microsoft_teams/v4_test.rb +++ b/test/models/pager_tree/integrations/channel/microsoft_teams/v4_test.rb @@ -132,7 +132,7 @@ class Channel::MicrosoftTeams::V4Test < ActiveSupport::TestCase text: @alert.description&.try(:to_plain_text), wrap: true, separator: true, - color: "Light" + maxLines: 24 }, { type: "FactSet",