Closed v-kydela closed 4 years ago
@v-kydela regarding MessageBack: The reason why Facebook throws an error is not because the value is complex but rather because text is null. Facebook Messager expects a string or number to be passed in the text property. Actually, BF Facebook channel drops any value passed in value property regardless of its type. If a channel supports complext data then that should be passed in value property otherwise always pass it in the text property. For example MS Teams does support complex object types.
Slack supports only string therefore only string values must be passed in text property. However, the channel defaults to the value in the value property if text property is null. Note that still in this case the value passed in the value property must still be a string value otherwise it will be dropped by the channel since slack expects only string in its value property.
Hope this helps understand why we have the A7350 spec the way it is.
For postback, value property MUST always be a string value and it must not be null in Facebook messager.
I will go ahead and close this issue.
The Messenger platform and the Telegram Bot API both expect the returned data in their buttons to be strings, but Bot Framework postBack and messageBack actions are designed so that their values are expected to be objects:
Slack buttons work the same way (their payloads must be strings), but rather than returning an error the Slack channel handles non-string values by just converting them to empty strings. While it would be better if the channel connector service actually serialized the objects into JSON, the point is that it doesn't return an error and neither should the Facebook and Telegram connectors.
To reproduce