Skip to content
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

fix: consistent user-agent handling #3060

Merged
merged 3 commits into from
Nov 12, 2020
Merged

Conversation

joshgummersall
Copy link
Contributor

Fixes #2082

Copy link
Member

@stevengum stevengum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@@ -1461,11 +1460,6 @@ export class BotFrameworkAdapter
return client;
}

/**
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: docs for private methods are not required.

});

// Resolve any user request policy factories, then includes our user agent via a factory policy
options.requestPolicyFactories = (defaultRequestPolicyFactories) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is some convoluted logic to handle all the edge cases in the tests while simply enabling the disabled test. The order of policies is important as the userAgentPolicy handler will not override an existing use

@joshgummersall joshgummersall merged commit 7e4e3bc into main Nov 12, 2020
@joshgummersall joshgummersall deleted the jpg/fix-bb-user-agent branch November 12, 2020 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BotFrameworkAdapter.getClientOptions should ensure requestPolicyFactories includes BB userAgent
2 participants