-
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
Cannot add a adaptivecard.Card to action.ShowCard #268
Comments
Oh and I am using the v2.11.0-alpha.1 version and go against the new MS Teams Workflow webhook. It works great so far. #262 |
I believe you're right. I went back over the earlier changes to the validation logic for go-teams-notify/adaptivecard/adaptivecard.go Lines 1932 to 1936 in 31c27ee
The validation helper collects any potential error as it is used and then returns it or nil here: go-teams-notify/adaptivecard/adaptivecard.go Lines 1939 to 1941 in 31c27ee
Incoming PR to address this. |
The now removed error handling was used prior to refactoring applied in commit 7ef6d52. credit: Thanks to @ArcticXWolf for reporting this. - refs GH-268 - refs GH-251
@ArcticXWolf Please test the change in v2.11.0-alpha.2: Based on your earlier testing I expect that you'll get the same results, but would appreciate the confirmation. Thanks! |
Yes, it works :) Thank you! |
@ArcticXWolf Thanks for confirming! Reopening this to serve as a tracking item for the next stable release. Thanks also for reporting this. |
The now removed error handling was used prior to refactoring applied in commit 7ef6d52. credit: Thanks to @ArcticXWolf for reporting this. - refs GH-268 - refs GH-251
Hello,
I think I stumbled upon a bug in the current validation code of the
Action.ShowCard
. If I try to add this action, I get the following error:But the field
Card
is exclusively FOR the action typeAction.ShowCard
.In line 1930 of adaptivecard.go the code checks if the action is of type
Action.ShowCard
. However afterwards in line 1932 it returns an error no matter what.https://github.com/atc0005/go-teams-notify/blob/master/adaptivecard/adaptivecard.go#L1932
I think we need to catch the return value of line 1930 and then skip line 1932 if it is true. I think in the current implementation you cannot use
Action.ShowCard
at all.If I just comment out line 1932, I can use the Action correctly.
The text was updated successfully, but these errors were encountered: