-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
commandMiddleware converting all inputs to lowerCase, breaking some command scenarios #11793
Comments
Hi, @NWH-SAmin5 ,
for command bot, the message user entered will be trimmed, and convert to lower cases to match the command TriggerPatterns. Due to SSO command bot would run into multiple turns to get the SSO token, so the context.activity.text will be lost, there is no easy way to get the original text directly.
To get original text, you can rewrite Here are the steps:
There is a sample project with above steps for your reference: https://github.com/SLdragon/sso-command-bot-get-message-context |
@SLdragon I have implemented as you have suggested. It does let me access original context. If there is an update to defaultBotSsoExecutionActivityHandler.ts from Teams Toolkit SDK on this file, it will have to be included in my custom file manually. correct? Is it true, when we define custom BotSsoExecutionActivityHandler it will ignore Default BotSsoExecutionActivityHandler? |
Yes, that's true, your custom BotSsoExecutionActivityHandler will override the defaultBotSsoExecutionActivityHandler file inside the SDK. |
Close as questions are answered and no further discussion |
teams-toolkit/packages/sdk/src/conversation/sso/botSsoExecutionDialog.ts
Line 223 in 6e69e41
I have a command bot. Using these libraries
I am building a sso command which accepts Teams meeting "JoinWebUrl" and get meeting details and responds to the user. In
handleCommandReceived
method it receives the user entered "JoinWebUrl" in all lower case which does not work for Teams meeting API as the URL contains "case sensitive" encoded meeting identifier. So if everything is converted to lower case API fails.This is happening for me in
TeamsFxBotSsoCommandHandler
not sure about other handlerI tried getting original text entered from the "context" object, but it is coming "undefined"
Question 1: Is there any way I can retrieve original entered text?
Question 2: Can the SDK be updated to return original text entered by user in "CommandMessage" object OR more appropriate way?
The text was updated successfully, but these errors were encountered: