rveachkc / pymsteams

Format messages and post to Microsoft Teams.
https://pypi.org/project/pymsteams/
Apache License 2.0
422 stars 78 forks source link

Potentialaction w/out input/actions ? #45

Closed jjh74 closed 5 years ago

jjh74 commented 5 years ago

Hello, I can't find a way to add a potentialaction without actions: [] array. I'd need to add something like this:

    {
      "@type": "HttpPOST",
      "name": "Click Me",
      "target": "https://...",
      "body": "{'a': 'b'}"
    }

(https://messagecardplayground.azurewebsites.net/ and "Github issue opened sample"). This adds a button you can just click and teams does POST straight away (without displaying any additional buttons/inputs).

I made a patch that adds addRawPotentialAction function for this (https://github.com/jjh74/pymsteams/tree/raw_potentialaction2) if this looks reasonable/acceptable I can create a PR for this.

rveachkc commented 5 years ago

I can review. Can you make a pull request into the develop branch?

jjh74 commented 5 years ago

I'll make a PR later.