The following problem works fine in Emulator but fails in Teams.
A Dialog opens a QnA Maker Dialog. Before the QnA prompts start -- it gets a VideoCard the first time a user goes to the dialog. I initially thought there was some issue with using the QnA Maker on Teams -- but on a whim, I commented out the video card part of the step (or more accurately...all the below code) -- and now it works!
Is there an issue below that would freeze out the step (only in Teams) would be greatly appreciated! (any issues with VideoCards on teams?)
var welcomeUserState = await (stepContext.Context.TurnState["DialogBotConversationStateAndUserStateAccessor"] as DialogBotConversationStateAndUserStateAccessor).WelcomeUserState.GetAsync(stepContext.Context);
if (welcomeUserState.DidSeeVideo == false)
{
welcomeUserState.DidSeeVideo = true;
// WaterfallStep always finishes with the end of the Waterfall or with another dialog; here it is a Prompt Dialog.
// Running a prompt here means the next WaterfallStep will be run when the users response is received.
//await stepContext.Context.SendActivityAsync(MessageFactory.Text($"THIRD WATERFALL STEP 1: This is the first step. You can put your code in each of these steps."), cancellationToken);
var reply = stepContext.Context.Activity.CreateReply();
reply.Attachments = new List<Attachment>();
reply.Attachments.Add(GetVideoCard().ToAttachment());
// Send the card(s) to the user as an attachment to the activity
await stepContext.Context.SendActivityAsync(reply, cancellationToken);
await Task.Delay(3000);
}
Above code and project is here: https://github.com/andrewchungxam/2019ITBot/blob/master/MultiDialogsWithAccessorBotV4/Dialogs/ThirdWaterfallDialog.cs
Error in Azure portal: 2/6/2019, 1:19:24 PM Malformed Video card - Invalid aspect value
Video card is not supported by Microsoft Teams.
You can use Task Module which allows you to create modal popup experiences in your Teams application. Inside the popup, you can run your own custom HTML/JavaScript code, show an -based widget such as a YouTube or Microsoft Stream video, or display an Adaptive Card.