botframework

Setup UserData for unit testing

痞子三分冷 提交于 2021-02-11 08:41:24
问题 How do i setup the UserData within the context for unit testing? var context = new Mock<IDialogContext>(); context.Setup(c => c.Activity).Returns(() => new Activity()); context.Setup(c => c.UserData).Returns(() => ?); Should i use BotData? 回答1: Used the "DialogTestBase" class from BotBuilder tests and this worked for me. IBotDataBag dataBag; var container = Build(Options.LastWriteWinsCachingBotDataStore); var msg = MakeTestMessage(); using (var scope = DialogModule.BeginLifetimeScope

MS Teams app manifest file Tenant restriction

断了今生、忘了曾经 提交于 2021-02-11 07:22:26
问题 I created the bot application and created the manifest file for it. I added it to the Microsoft teams and it is working fine. So if I use that manifest file with the other tenant account then also that app will be added and working. I don't want it to be like this. If the other tenant people tries to add the manifest it should not work or added. How to give tenant restriction in the manifest file? I am attaching my manifest file also. { "$schema": "https://developer.microsoft.com/en-us/json

How to subscribe to the refresh token event

◇◆丶佛笑我妖孽 提交于 2021-02-10 21:53:44
问题 The problem is that I need to be able to subscribe to the token refresh event and I can't figure out how. I know people advise on subscribing to connectionStatus$ and handling the ConnectionStatus.ExpiredToken case, but the execution never enters that case when refreshing happens, it only enters that case when I try to initialize the bot with an expired token. The token refresh event is getting triggered every 15 minutes by the library itself but there is no observable that will allow me to

BotFramework: The bot's MSA appId or password is incorrect

烂漫一生 提交于 2021-02-10 20:52:10
问题 Issue: Bot started showing me an error, when using the emulator. While i am not sure, i think the emulator might have been updated Debugging I checked that the AppID and secret are correct. Error: -> POST 401 [conversationUpdate] Error: The bot's MSA appId or password is incorrect. Edit your bot's MSA info web.config Info: <!-- update these with your appid and one of your appsecret keys--> <add key="MicrosoftAppID" value="XXXXXXXXXXXXXX" /> <add key="MicrosoftAppPassword" value="YYYYYYYYYY" /

BotFramework: The bot's MSA appId or password is incorrect

三世轮回 提交于 2021-02-10 20:43:27
问题 Issue: Bot started showing me an error, when using the emulator. While i am not sure, i think the emulator might have been updated Debugging I checked that the AppID and secret are correct. Error: -> POST 401 [conversationUpdate] Error: The bot's MSA appId or password is incorrect. Edit your bot's MSA info web.config Info: <!-- update these with your appid and one of your appsecret keys--> <add key="MicrosoftAppID" value="XXXXXXXXXXXXXX" /> <add key="MicrosoftAppPassword" value="YYYYYYYYYY" /

botframework - How to include Adaptive card inside the carousel

你说的曾经没有我的故事 提交于 2021-02-10 18:27:31
问题 Did anybody tried to include adaptivecards inside a carousel? I am using nodejs sdk of botframework. 回答1: I believe what you are looking for is included in this example inside the botbuild-samples repository. in this example this is how the cards are built: function getCardsAttachments(session) { return [ new builder.HeroCard(session) .title('Azure Storage') .subtitle('Offload the heavy lifting of data center management') .text('Store and help protect your data. Get durable, highly available

ajaxExtended call Failed error in azuure bot services

末鹿安然 提交于 2021-02-10 18:12:58
问题 I have encountered "ajaxExtended call failed" error when tried to create a bot using the Azure services. I don't have any SDK bot that I can migrate. Provided the screenshot below. Error Screenshot 回答1: I had the same issue when I was trying to build a Web App Bot with the same name as one I'd recently deleted. I changed the name and it worked. 来源: https://stackoverflow.com/questions/47879679/ajaxextended-call-failed-error-in-azuure-bot-services

Wait for Even type Activity in a waterfallstep dialog (bot framework 4.0)

我只是一个虾纸丫 提交于 2021-02-10 15:28:11
问题 It's possible to wait and receive an Event type activity in a waterfall step dialog. I use directline 3.0 and inside a dialog flow I send an event from the bot to the client. After i would like to send an event from the client to the bot as an answer to previous send. If i use prompt await dc.Prompt("waitEvent",activity) where waitEvent is a textprompt and i answer with a message it works fine but I would like to answer to an event with an event. I was thinking that i could write a custom

UserState showing null in onMembersAdded function

﹥>﹥吖頭↗ 提交于 2021-02-10 14:48:47
问题 I have logic in my onMembersAdded function to load the user state and see if userData.accountNumber attribute exists. If it does not, a run an auth dialog to get the user's account number. If the attribute does exist, the welcome message should be displayed without a prompt. When I test on local, this works fine. But when I test on Azure, I always end up in the !userData.accountNumber block. Through checking the console log, I can see that in the onMembersAdded function is showing {} for the

UserState showing null in onMembersAdded function

爷,独闯天下 提交于 2021-02-10 14:48:23
问题 I have logic in my onMembersAdded function to load the user state and see if userData.accountNumber attribute exists. If it does not, a run an auth dialog to get the user's account number. If the attribute does exist, the welcome message should be displayed without a prompt. When I test on local, this works fine. But when I test on Azure, I always end up in the !userData.accountNumber block. Through checking the console log, I can see that in the onMembersAdded function is showing {} for the