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

feat: create conversation #3805

Merged
merged 2 commits into from
Jun 24, 2021
Merged

feat: create conversation #3805

merged 2 commits into from
Jun 24, 2021

Conversation

joshgummersall
Copy link
Contributor

Fixes #3752

@joshgummersall joshgummersall requested a review from a team as a code owner June 24, 2021 18:03
@joshgummersall joshgummersall force-pushed the jpg/create-conversation branch 2 times, most recently from 836f893 to b223eff Compare June 24, 2021 18:41
@coveralls
Copy link

coveralls commented Jun 24, 2021

Pull Request Test Coverage Report for Build 969180472

  • 1 of 24 (4.17%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.09%) to 83.711%

Changes Missing Coverage Covered Lines Changed/Added Lines %
libraries/botbuilder-core/src/botAdapter.ts 0 1 0.0%
libraries/botbuilder-core/src/cloudAdapterBase.ts 1 23 4.35%
Totals Coverage Status
Change from base Build 968813841: -0.09%
Covered Lines: 19497
Relevant Lines: 22065

💛 - Coveralls

Note: *Async postfix is due to conflicts with BotFrameworkAdapter

Fixes #3752
@joshgummersall joshgummersall force-pushed the jpg/create-conversation branch from b223eff to 1c3e9d6 Compare June 24, 2021 18:58
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.

Are the applicable Teams flows functional with these changes?

// Create a turn context and run the pipeline.
const context = this.createTurnContext(
createActivity,
claimsIdentity,
Copy link
Member

Choose a reason for hiding this comment

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

I would expect that at this point, the claimsIdentity would have an audienceClaim with the value of audience, not the botAppId:

return new ClaimsIdentity([
{
type: AuthenticationConstants.AudienceClaim,
value: botAppId,
},
{
type: AuthenticationConstants.AppIdClaim,
value: botAppId,
},

Is there a reason this isn't the case?

What will happen is that the ClaimsIdentity is essentially Emulator-esque as the appId and audience claim are the same value (the botAppId), whereas the created ConnectorClient is properly addressed to the passed in audience. This audience will can be a channel, another bot, or something else entirely.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure, I followed John's lead in porting this. As far as I can tell, this is equivalent to .NET. Perhaps we should file an issue on .NET?

@joshgummersall
Copy link
Contributor Author

joshgummersall commented Jun 24, 2021

Working on testing in Teams.

EDIT: @stevengum, I was able to successfully call createConversationAsync and send an activity to myself in Teams.

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.

Approved, let's follow up on the proper claims construction in the .NET repo

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.

port: add create conversation to CloudAdapter (#5562)
3 participants