The v4 Emulator which uses 0.13.1-master.6da7b6c will show the user SuggestedActions that were sent to the bot. Testing this using the iFrame also renders the same result, SuggestedActions that should be only "seen" by the bot are showing for the user.
On other channels like Skype, if the suggestedAction to field is populated with the bot's id, the SuggestedActions do not render for the user.
Example code from BB-Py #100:
activity = Activity(
type=ActivityTypes.message,
channel_id=activity.channel_id,
conversation=activity.conversation,
from_property=activity.recipient,
recipient=activity.from_property,
service_url=activity.service_url
)
replies = [
{
"title": "Test1",
"type": ActionTypes.im_back,
"value": "Test1",
},
{
"title": "Test2",
"type": ActionTypes.im_back,
"value": "Test2",
}
]
activity.text = "My text"
# The following line is where the problem code in the bot exists: `to` uses
# `activity.from_property.id` instead of `activity.recipient.id`
activity.suggested_actions = SuggestedActions(actions=replies, to=[activity.from_property.id])
The activity's SuggestedActions show up for the user in WebChat and in the v4 Emulator, whereas this code sent to another channel would not work. Sending this activity to Skype results in the text, "My text" appearing, but not the SuggestedActions.
For activities with "receipient = bot" and contains suggested actions, Web Chat should not show suggested actions. Is that right?
activityWithSuggestedActions.ts:10 to filter out activities not targeting the current user~History.tsx~Will fix in v4.
@tonyanziano hey are you working on this atm? Could you let us know your status? :)
Fix in the code is already in. Just needs a test.
Note from Tony: this is already in codebase and test needs to be written. Leaving as 4.2