forked from dasrick/go-teams-notify
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Adaptive Card message format support #162
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add early (and incomplete) implementation of `Adaptive Card` format (new `adaptivecard` package). This new package is an alternative to the current implementation of the legacy `MessageCard` format (`messagecard` package). Remove `botapi` package. This package was a partial implementation and intended as a temporary resource until the `adaptivecard` package was developed sufficiently to replace it. This package could make an appearance later in a more complete form if there is need for it. CHANGES The changes listed here are in comparison to the previous v2.7.0-alpha.1 release. - add initial implementation of the `adaptivecard` package - remove partial implementation of `botapi` package - incomplete implementation, known issues (atc0005/send2teams#225) - example code - create subdir for new `adaptivecard` examples and populate with equivalents - create subdir for existing `messagecard` examples - refresh doc comments of existing examples - attempt to simplify implementation of examples - documentation refresh - cover new features provided by the new `adaptivecard` package - make note of plans to extend v2 branch features while retaining backwards compatibility with an eye towards a future v3 series - add `goteamsnotify.InList()` helper func - simplify `goteamsnotify.messagePreparer` interface - simplify `MessageCard.Prepare()` implementation - explicitly mark files containing exclusively deprecated code - explicitly mark existing formatting functionality as specific to the `MessageCard` format LIMITATIONS - the `adaptivecard` package is new and its API is subject to change before the next stable release - the `adaptivecard` package is incomplete - while the new package contains sufficient functionality to be useful and provide a close approximation of functionality to the existing `messagecard` package, it is still missing support for some (available) features that the older package provides - there are many TODO items for the new `adaptivecard` package, most of which are intended to be removed before the next stable release - there are active `gocognit` linter warnings for the `Validate()` method for multiple types in the new `adaptivecard` package - this method is responsible for asserting known requirements for multiple field values for its type - more "bake time" is needed to determine a simpler approach REFERENCES - refs GH-157 - refs atc0005/send2teams#225
atc0005
added
documentation
Improvements or additions to documentation
enhancement
New feature or request
api
labels
Apr 10, 2022
Regarding linter warnings:
|
atc0005
added a commit
to atc0005/send2teams
that referenced
this pull request
Apr 10, 2022
OVERVIEW Resolve intermittent user mention submission failure by swapping out the `botapi` implementation of user mention support for the new `adaptivecard` package. This new package generates payloads with user mentions that fully comply with published Microsoft Teams requirements. Temporary restrictions applied in the last release between user mentions and the URL "buttons", title flags have been removed. This app now exclusively uses the `adaptivecard` package. Unfortunately, the `Adaptive Card` format does not (at the time of this writing) support message color theming (border trim color). This flag now is a NOOP; while using this flag does not produce an error, it no longer does anything. CHANGES - replace `botapi` and `messagecard` packages with `adaptivecard` package - exclusively use `adaptivecard` package to generate Microsoft Teams messages - add missing checks for use of `--silent` flag before emitting warning/error output - resolve intermittent user mention submission failure - the `--target-url` flag no longer enforces a set limit of 4 URL "buttons" - documentation - the current Microsoft Teams message size limit of *approximately* 28 KB is explicitly noted - references to the `references to the `--color` flag have been removed (aside from the explicit NOOP behavior in the config flag table) - mention that the generated JSON payload is now emitted in verbose ouput (exposed via the `--verbose` flag) REFERENCES - refs GH-225 - refs atc0005/go-teams-notify#162
atc0005
added a commit
to atc0005/send2teams
that referenced
this pull request
Apr 10, 2022
OVERVIEW Resolve intermittent user mention submission failure by swapping out the `botapi` implementation of user mention support for the new `adaptivecard` package. This new package generates payloads with user mentions that fully comply with published Microsoft Teams requirements. Temporary restrictions applied in the last release between user mentions and the URL "buttons", title flags have been removed. This app now exclusively uses the `adaptivecard` package. Unfortunately, the `Adaptive Card` format does not (at the time of this writing) support message color theming (border trim color). This flag now is a NOOP; while using this flag does not produce an error, it no longer does anything. CHANGES - replace `botapi` and `messagecard` packages with `adaptivecard` package - exclusively use `adaptivecard` package to generate Microsoft Teams messages - add missing checks for use of `--silent` flag before emitting warning/error output - resolve intermittent user mention submission failure - the `--target-url` flag no longer enforces a set limit of 4 URL "buttons" - documentation - the current Microsoft Teams message size limit of *approximately* 28 KB is explicitly noted - references to the `references to the `--color` flag have been removed (aside from the explicit NOOP behavior in the config flag table) - mention that the generated JSON payload is now emitted in verbose ouput (exposed via the `--verbose` flag) REFERENCES - refs GH-225 - refs atc0005/go-teams-notify#162
atc0005
added a commit
to atc0005/send2teams
that referenced
this pull request
Apr 11, 2022
OVERVIEW Resolve intermittent user mention submission failure by swapping out the `botapi` implementation of user mention support for the new `adaptivecard` package. This new package generates payloads with user mentions that fully comply with published Microsoft Teams requirements. Temporary restrictions applied in the last release between user mentions and the URL "buttons", title flags have been removed. This app now exclusively uses the `adaptivecard` package. Unfortunately, the `Adaptive Card` format does not (at the time of this writing) support message color theming (border trim color). This flag now is a NOOP; while using this flag does not produce an error, it no longer does anything. CHANGES - replace `botapi` and `messagecard` packages with `adaptivecard` package - exclusively use `adaptivecard` package to generate Microsoft Teams messages - add missing checks for use of `--silent` flag before emitting warning/error output - resolve intermittent user mention submission failure - the `--target-url` flag no longer enforces a set limit of 4 URL "buttons" - documentation - the current Microsoft Teams message size limit of *approximately* 28 KB is explicitly noted - references to the `--color` flag have been removed (aside from the explicit NOOP behavior in the config flag table) - mention that the generated JSON payload is now emitted in verbose ouput (exposed via the `--verbose` flag) REFERENCES - refs GH-225 - refs atc0005/go-teams-notify#162
atc0005
added a commit
to atc0005/send2teams
that referenced
this pull request
Apr 11, 2022
OVERVIEW Resolve intermittent user mention submission failure by swapping out the `botapi` implementation of user mention support for the new `adaptivecard` package. This new package generates payloads with user mentions that fully comply with published Microsoft Teams requirements. Temporary restrictions applied in the last release between user mentions and the URL "buttons", title flags have been removed. This app now exclusively uses the `adaptivecard` package. Unfortunately, the `Adaptive Card` format does not (at the time of this writing) support message color theming (border trim color). This flag now is a NOOP; while using this flag does not produce an error, it no longer does anything. CHANGES - replace `botapi` and `messagecard` packages with `adaptivecard` package - exclusively use `adaptivecard` package to generate Microsoft Teams messages - add missing checks for use of `--silent` flag before emitting warning/error output - resolve intermittent user mention submission failure - the `--target-url` flag no longer enforces a set limit of 4 URL "buttons" - documentation - the current Microsoft Teams message size limit of *approximately* 28 KB is explicitly noted - references to the `--color` flag have been removed (aside from the explicit NOOP behavior in the config flag table) - mention that the generated JSON payload is now emitted in verbose ouput (exposed via the `--verbose` flag) REFERENCES - refs GH-225 - refs atc0005/go-teams-notify#162
atc0005
added
card format/adaptivecard
Adaptive Card support
card format/messagecard
MessageCard (aka, "legacy actionable message card") support
labels
Mar 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api
card format/adaptivecard
Adaptive Card support
card format/messagecard
MessageCard (aka, "legacy actionable message card") support
documentation
Improvements or additions to documentation
enhancement
New feature or request
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Add early (and incomplete) implementation of
Adaptive Card
format(new
adaptivecard
package). This new package is an alternative tothe current implementation of the legacy
MessageCard
format(
messagecard
package).Remove
botapi
package. This package was a partial implementation andintended as a temporary resource until the
adaptivecard
package wasdeveloped sufficiently to replace it. This package could make an
appearance later in a more complete form if there is need for it.
Changes
The changes listed here are in comparison to the previous
v2.7.0-alpha.1 release.
adaptivecard
packagebotapi
package--user-mention
flag send2teams#225)adaptivecard
examples and populate withequivalents
messagecard
examplesadaptivecard
packagebackwards compatibility with an eye towards a future v3 series
goteamsnotify.InList()
helper funcgoteamsnotify.messagePreparer
interfaceMessageCard.Prepare()
implementationMessageCard
formatLimitations
adaptivecard
package is new and its API is subject to changebefore the next stable release
adaptivecard
package is incompleteuseful and provide a close approximation of functionality to the
existing
messagecard
package, it is still missing support forsome (available) features that the older package provides
adaptivecard
package, mostof which are intended to be removed before the next stable release
gocognit
linter warnings for theValidate()
method for multiple types in the new
adaptivecard
packagemultiple field values for its type
References
Adaptive Card
message format support #157--user-mention
flag send2teams#225