Releases: dasrick/go-teams-notify
Releases · dasrick/go-teams-notify
v2.1.0
New
-
MessageCard
type includes additional fieldsType
andContext
fields provide required JSON payload
fields- preset to required static values via updated
NewMessageCard()
constructor
- preset to required static values via updated
Summary
- required if
Text
field is not set, optional otherwise
- required if
Sections
sliceMessageCardSection
type
-
Additional nested types
MessageCardSection
MessageCardSectionFact
MessageCardSectionImage
-
Additional methods for
MessageCard
and nested typesMessageCard.AddSection()
MessageCardSection.AddFact()
MessageCardSection.AddFactFromKeyValue()
MessageCardSection.AddImage()
MessageCardSection.AddHeroImageStr()
MessageCardSection.AddHeroImage()
-
Additional factory functions
NewMessageCardSection()
NewMessageCardSectionFact()
NewMessageCardSectionImage()
-
IsValidMessageCard()
added to check for minimum required
field values.- This function has the potential to be extended
later with additional validation steps.
- This function has the potential to be extended
-
Wrapper
IsValidInput()
added to handle all validation
needs from one location.- the intent was to both solve a CI erro and provide
a location to easily extend validation checks in
the future (if needed)
- the intent was to both solve a CI erro and provide
Changed
-
MessageCard
type includes additional fields -
NewMessageCard
factory function sets fields needed for
required JSON payload fieldsType
Context
-
teamsClient.Send()
method updated to applyMessageCard
struct
validation alongside existing webhook URL validation -
isValidWebhookURL()
exported asIsValidWebhookURL()
so that client
code can use the validation functionality instead of repeating the
code- e.g., flag value validation for "fail early" behavior
Known Issues
- No support in this set of changes for
potentialAction
typesViewAction
OpenUri
HttpPOST
ActionCard
InvokeAddInCommand
- Outlook specific based on what I read; likely not included
in a future release due to non-Teams specific usage
- Outlook specific based on what I read; likely not included