botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Microsoft Teams: postBack doesn't conform to documentation

Open james-lawrence opened this issue 9 years ago • 6 comments

documentation instead of just sending the message to the bot, the message is displayed and then sent to the bot. I also suspect that when this issue is fixed the message sent won't contain the id of the message containing the button (though it really should)

postback-issues

POST /v3/conversations/19:c3ec28d6-7188-45ec-996a-1e9341a6e307_0b45f374-86b1-4dcd-9e4f-bf17f573d6fc@unq.gbl.spaces/activities HTTP/1.1
Host: skype.botframework.com
User-Agent: Go-http-client/1.1
Content-Length: 950
Accept: application/json
Accept: text/json
Content-Type: application/json
Accept-Encoding: gzip
[1B blob data]
{"attachments":[{"content":{"buttons":[{"title":"Show a demo","type":"postBack","value":"start_demo"},{"title":"Give feedback","type":"postBack","value":"collect_feedback"}],"images":null},"contentType":"application/vnd.microsoft.card.hero"}],"channelId":"msteams","conversation":{"id":"19:c3ec28d6-7188-45ec-996a-1e9341a6e307_0b45f374-86b1-4dcd-9e4f-bf17f573d6fc@unq.gbl.spaces"},"entities":null,"from":{"id":"28:0b45f374-86b1-4dcd-9e4f-bf17f573d6fc"},"localTimestamp":"2016-12-09T13:00:04.156Z","membersAdded":null,"membersRemoved":null,"recipient":{"id":"c3ec28d6-7188-45ec-996a-1e9341a6e307"},"serviceUrl":"https://skype.botframework.com","text":"Go to your team's [Training Portal](http://google.com) to get started.\n","textFormat":"markdown","timestamp":"2016-12-09T13:00:04.156Z","type":"message"}
HTTP/1.1 201 Created
Content-Length: 98
Cache-Control: no-store, must-revalidate, no-cache
Content-Type: application/json; charset=utf-8
Contextid: tcid=4229219155865299294,server=EAP010201162175
Date: Fri, 09 Dec 2016 13:00:03 GMT
Pragma: no-cache
Server: Microsoft-IIS/8.0
Strict-Transport-Security: max-age=31536000
X-Powered-By: ASP.NET
[1B blob data]
{"id":"0:1JQEwnDqgHCsPU970sG2F1tZ1jShngwzHPX5GPWz4sJsfpFmvhfNWCJyha0xQuilYZepj3rygw9a7CdU5Em8dkA"}

james-lawrence avatar Dec 09 '16 13:12 james-lawrence

PostBack is not really supported in Teams at this time.

Please view the documentation at https://msdn.microsoft.com/en-us/microsoft-teams/bots#cards-and-buttons. We only support imBack and openUrl currently.

siduppal avatar Dec 15 '16 05:12 siduppal

Closing this issue as it appears we've answered the open question. If you'd like to discuss further, please at-mention or open a new issue.

dandriscoll avatar Dec 21 '16 22:12 dandriscoll

@dandriscoll main question is will it be supported? openURL doesn't work for our usecase, as we don't want to send them to a url we just want an answer to the response, and imBack isn't useful because ideally we don't want the user seeing a encoded id, which is only useful for our system.

james-lawrence avatar Jan 03 '17 19:01 james-lawrence

Yes we are currently working on PostBack support for Skype and for Teams, which will address exactly what you've mentioned above. Be on the lookout for an update in the near future.

larryjin avatar Jan 04 '17 19:01 larryjin

@larryjin is Postback support on Teams now???

Malith1994124 avatar Apr 23 '17 19:04 Malith1994124

For those who end up here, the updated link for supported action types in MSTeams: https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/cards/cards-actions

jmnsf avatar Oct 11 '19 14:10 jmnsf