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

port: fix issues w/ ExpectReplies, invoke in SkillDialog #2966

Conversation

joshgummersall
Copy link
Contributor

Also includes some small cleanup/formatting changes.

Fixes #2962

conversationId: string,
activity: Activity
) => Promise<InvokeResponse>);
postActivity: <T = any>(
Copy link
Contributor Author

@joshgummersall joshgummersall Oct 27, 2020

Choose a reason for hiding this comment

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

This is the fix to remove the unnecessary as casting here. The signatures are equivalent due as T is defaulted to any.

@joshgummersall joshgummersall changed the title Fix issues w/ ExpectReplies, invoke in SkillDialog port: fix issues w/ ExpectReplies, invoke in SkillDialog Oct 27, 2020
Also includes some small cleanup/formatting changes.

Fixes #2962
@joshgummersall joshgummersall force-pushed the jpg/port-fix-issue-with-expect-replies-and-invoke-in-skill-dialog branch from c94af39 to ec889ba Compare October 27, 2020 22:44

// Ensure the TurnState has the InvokeResponseKey, since this activity
// is not being sent through the adapter, where it would be added to TurnState.
if (a.type === ActivityTypes.InvokeResponse) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

@stevengum stevengum Oct 28, 2020

Choose a reason for hiding this comment

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

The JS code looks good 👍

@gabog, @johnataylor do we need to use TryAdd in .NET or some sort of "TrySet"?

Copy link
Member

Choose a reason for hiding this comment

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

We want to do a last-write wins in .NET if I'm correctly recall the implementation around TeamsActivityHandler. .Add() (depending on the class/implementation) normally throws an exception iirc.

Copy link
Contributor

@gabog gabog left a comment

Choose a reason for hiding this comment

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

Looks good to me, @EricDahlvang, would you be able to take a quick pass and make sure nothing is missing?

Copy link
Member

@EricDahlvang EricDahlvang left a comment

Choose a reason for hiding this comment

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

lgtm

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.

This looks fine... Are we squared away in .NET with test coverage? If not can you do a pass at testing the JS E2E with @gabog's assistance and make sure test coverage is added for these changes in JS?

(Either update the PR with some unit tests (preferable) or file an issue for R12 to add appropriate unit tests)

@joshgummersall joshgummersall mentioned this pull request Oct 28, 2020
@joshgummersall
Copy link
Contributor Author

I've created #2969 so we don't hold up the new RC.

@joshgummersall joshgummersall merged commit 70677cb into main Oct 28, 2020
@joshgummersall joshgummersall deleted the jpg/port-fix-issue-with-expect-replies-and-invoke-in-skill-dialog branch October 28, 2020 19:08
joshgummersall added a commit that referenced this pull request Oct 28, 2020
Also includes some small cleanup/formatting changes.

Fixes #2962
joshgummersall added a commit that referenced this pull request Oct 28, 2020
Also includes some small cleanup/formatting changes.

Fixes #2962
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: Fix issues with ExpectReplies and Invoke in SkillDialog
4 participants