add CustomData param to New-PoshBotCardResponse#89
Merged
devblackops merged 3 commits intoposhbotio:masterfrom Aug 3, 2018
Merged
Conversation
This is to allow custom data to be passed back to SendMessage in the Data stream of the response. Backend developers can leverage this to receive parsable data (i.e. REST body JSON) specific to their card response options. This will also be ignored by the included backends (Slack and Teams), so plugins/backends using this can create functions that will be cross-backend compatible.
scrthq
commented
Aug 3, 2018
| Text = $Text.Trim() | ||
| Private = $PSBoundParameters.ContainsKey('Private') | ||
| DM = $PSBoundParameters.ContainsKey('DM') | ||
| DM = $PSBoundParameters['DM'] |
Contributor
Author
There was a problem hiding this comment.
This was changed to allow the DM switch to work as expected if someone passed it as -DM:$false. Currently, DM will always equal true if the parameter is present in PSBoundParameters.
scrthq
commented
Aug 3, 2018
| PSTypeName = 'PoshBot.Card.Response' | ||
| Type = $Type | ||
| Text = $Text.Trim() | ||
| Private = $PSBoundParameters.ContainsKey('Private') |
Contributor
Author
There was a problem hiding this comment.
Is Private just here as a reservation or can it be removed as well? The current parameters don't apparently have Private included.
Member
There was a problem hiding this comment.
Oooh. That's some old, dead code right there. I'll remove it. Thanks for catching that.
Member
|
Thanks for this! |
Contributor
Author
|
Cheers! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This is to allow custom data to be passed back to SendMessage in the Data stream of the response. Backend developers can leverage this to receive parsable data (i.e. REST body JSON) specific to their card response options. This will also be ignored by the included backends (Slack and Teams), so plugins/backends using this can create functions that will be cross-backend compatible.
Related Issue
#88
Motivation and Context
This is to allow custom data to be passed back to SendMessage in the Data stream of the response and be parsed by custom backends.
How Has This Been Tested?
This has been tested during the buildout of the Google Chat backend I'm adding to PSGSuite currently. PSGSuite itself is tested in PS 5-Core via AppVeyor and Travis CI.
Screenshots:
Types of changes
Checklist: