Describe the bug
If a connectorcard object adds a potentialaction or cardsection prior to the text being set, no changes to the text can be set.
To Reproduce
Steps to reproduce the behavior:
Create connectorcard object
Create potentialaction / cardsection object and fill in as necessary
Add potentialaction / cardsection to connectorcard
connectorcard.text = 'Some text'
connectorcard.send() yields 'pymsteams.TeamsWebhookException: Summary or Text is required.' connectorcard.payload is missing key for text
Expected behavior
text(inputText) should be updating the payload dict with key-value pair of 'text' : inputText
Additional context
Strangely enough, the workaround for this is to set the connectorcard's payload manually, i.e. connectorcard.payload['text'] = 'This is some text'. This is bizarre, since this is what the text() method is already doing.
Also tried:
payload = connectorCard.payload payload['text'] = 'Testing123' connectorCard.payload = payload
which seemed to work. Weird.
Describe the bug If a connectorcard object adds a potentialaction or cardsection prior to the text being set, no changes to the text can be set.
To Reproduce Steps to reproduce the behavior:
Expected behavior text(inputText) should be updating the payload dict with key-value pair of 'text' : inputText
Additional context Strangely enough, the workaround for this is to set the connectorcard's payload manually, i.e. connectorcard.payload['text'] = 'This is some text'. This is bizarre, since this is what the text() method is already doing.
Also tried:
payload = connectorCard.payload payload['text'] = 'Testing123' connectorCard.payload = payload
which seemed to work. Weird.