-
Notifications
You must be signed in to change notification settings - Fork 281
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
Add userId parameter to signOutUser #797
Conversation
Pull Request Test Coverage Report for Build #2052
💛 - Coveralls |
7c2b799
to
3a5d46f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it practical to add a test around this?
if (!context.activity.from || !context.activity.from.id) { | ||
throw new Error(`BotFrameworkAdapter.signOutUser(): missing from or from.id`); | ||
} | ||
!userId? userId = context.activity.from.id: userId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you do this using a less weird syntax? This makes my head hurt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
…botbuilder-js into issue/signOutUser
Hi @Aliandi, Fork merges are disabled that's why the build is failing. Chris has grant you write permissions to the repo. Thanks! |
Replaced by #837 |
Parity with C#
Description
It was found that the TypeScript method signOutUser() differed from the C# implementation of signOutUserAsync(). The TypeScript version expects less parameters, not letting the user pass a userId.
TypeScript
public async signOutUser(context: TurnContext, connectionName: string): Promise<void>
C#
public virtual async Task SignOutUserAsync(ITurnContext turnContext, string connectionName = null, string userId = null, CancellationToken cancellationToken = default(CancellationToken))
Specific Changes