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

Cleaned up adapter #544

Merged
merged 8 commits into from
Oct 22, 2018
Merged

Cleaned up adapter #544

merged 8 commits into from
Oct 22, 2018

Conversation

Stevenic
Copy link
Contributor

  • Updated code to use async/await
  • Fixed status codes returned by processActivity().
  • Added ability to pass ConversationParamters to createConversation().

- Updated code to use async/await
- Fixed status codes returned by processActivity().
- Added ability to pass ConversationParamters to createConversation().
});
} catch (err) {
return Promise.reject(err);
public createConversation(reference: Partial<ConversationReference>, logic: (context: TurnContext) => Promise<void>): Promise<void>;
Copy link
Contributor

Choose a reason for hiding this comment

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

The C# SDK has a single method here called:

public virtual async Task CreateConversationAsync(string channelId, string serviceUrl, MicrosoftAppCredentials credentials, ConversationParameters conversationParameters, BotCallbackHandler callback, CancellationToken cancellationToken)
Neither of the overloads here seem to align with that.

Can you please remove this change - which is adding new interfaces / functionality - into a different PR?

} catch (err) {
return Promise.reject(err);
public createConversation(reference: Partial<ConversationReference>, logic: (context: TurnContext) => Promise<void>): Promise<void>;
public createConversation(reference: Partial<ConversationReference>, params: ConversationParameters, logic: (context: TurnContext) => Promise<void>): Promise<void>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why wouldn't this overload be async as well?

Copy link
Contributor

Choose a reason for hiding this comment

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

This overload is new, but doesn't have a test.

}

// Initialize params
params.bot = reference.bot;
Copy link
Contributor

Choose a reason for hiding this comment

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

This logic in here seems like it should be closer to the C# code, if changes are going to be made. Wouldn't be hard to much more closly align them.

I would suggest removing this change from this PR, and have this PR just do the async/await change.

@johnataylor
Copy link
Member

How about we make this separate PRs?

  1. consistent application of async/await

  2. alignment with C# adapter methods

  3. http returns 200

@Stevenic Stevenic dismissed cleemullins’s stale review October 18, 2018 23:58

He's out for the week

@coveralls
Copy link

coveralls commented Oct 22, 2018

Pull Request Test Coverage Report for Build 1905

  • 87 of 118 (73.73%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 73.135%

Changes Missing Coverage Covered Lines Changed/Added Lines %
libraries/botbuilder/src/botFrameworkAdapter.ts 87 118 73.73%
Totals Coverage Status
Change from base Build 1891: -0.1%
Covered Lines: 2292
Relevant Lines: 3032

💛 - Coveralls

@cleemullins cleemullins merged commit 2d36e7d into master Oct 22, 2018
@cleemullins cleemullins deleted the stevenic/adapter-cleanup branch October 22, 2018 21:50
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.

5 participants