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 erroneous Async suffix in some comments, error messages, etc. #2476

Merged
merged 3 commits into from
Jul 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export abstract class SkillConversationIdFactoryBase {

/**
* Gets the SkillConversationReference created using createSkillConversationId() for a skillConversationId.
* @param skillConversationId Gets the SkillConversationReference used during CreateSkillConversationIdAsync for a skillConversationId.
* @param skillConversationId Gets the SkillConversationReference used during createSkillConversationId for a skillConversationId.
*/
public getSkillConversationReference(skillConversationId: string): Promise<SkillConversationReference> {
throw new Error('Not Implemented');
Expand Down
2 changes: 1 addition & 1 deletion libraries/botbuilder-dialogs/src/dialogSet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export class DialogSet {
*/
public async createContext(context: TurnContext): Promise<DialogContext> {
if (!this.dialogState) {
throw new Error(`DialogSet.createContextAsync(): the dialog set was not bound to a stateProperty when constructed.`);
throw new Error(`DialogSet.createContext(): the dialog set was not bound to a stateProperty when constructed.`);
}
const state: DialogState = await this.dialogState.get(context, { dialogStack: [] } as DialogState);

Expand Down
2 changes: 1 addition & 1 deletion libraries/botbuilder-dialogs/src/skillDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class SkillDialog extends Dialog<Partial<BeginSkillDialogOptions>> {
public async endDialog(context: TurnContext, instance: DialogInstance, reason: DialogReason): Promise<void> {
// Send of of conversation to the skill if the dialog has been cancelled.
if (reason == DialogReason.cancelCalled || reason == DialogReason.replaceCalled) {
await context.sendTraceActivity(`${ this.id }.EndDialogAsync()`, undefined, undefined, `ActivityType: ${ context.activity.type }`);
await context.sendTraceActivity(`${ this.id }.endDialog()`, undefined, undefined, `ActivityType: ${ context.activity.type }`);

const reference = TurnContext.getConversationReference(context.activity);
// Apply conversation reference and common properties from incoming activity before sending.
Expand Down
2 changes: 1 addition & 1 deletion libraries/botbuilder-dialogs/tests/dialogSet.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('DialogSet', function () {
try {
const dc = await dialogs.createContext({ type: 'message', text: 'hi' });
} catch (err) {
assert(err.message === 'DialogSet.createContextAsync(): the dialog set was not bound to a stateProperty when constructed.', `unexpected error thrown: ${ err.message }`);
assert(err.message === 'DialogSet.createContext(): the dialog set was not bound to a stateProperty when constructed.', `unexpected error thrown: ${ err.message }`);
}
});

Expand Down
4 changes: 2 additions & 2 deletions libraries/botframework-config/tests/loadAndSave.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ describe("LoadAndSaveTests", () => {

try {
config.saveAsSync(null, secret);
assert.fail("SaveAsAsync with null should throw");
assert.fail("saveAsSync with null should throw");
} catch (err) { }

try {
await config.saveAs(null, secret);
assert.fail("SaveAsAsync with null should throw");
assert.fail("saveAs with null should throw");
} catch (err) { }
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ export class Conversations {
* example of how to do that would be:
*
* ```
* var resource = await connector.conversations.CreateConversation(new ConversationParameters(){
* Bot = bot, members = new ChannelAccount[] { new ChannelAccount("user1") } );
* await connect.Conversations.SendToConversationAsync(resource.Id, new Activity() ... ) ;
*
* const resource = await connector.conversations.createConversation({
* bot,
* members: [{ id: 'user1' }]
* });
* await connector.conversations.sendToConversation(resource.Id, ... );
* ```
* @summary CreateConversation
* @param parameters Parameters to create the conversation from
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class WebSocketTransport implements ITransportSender, ITransportReceiver
*/
public async receive(count: number): Promise<INodeBuffer> {
if (this._activeReceiveResolve) {
throw new Error('Cannot call receiveAsync more than once before it has returned.');
throw new Error('Cannot call receive more than once before it has returned.');
}

this._activeReceiveCount = count;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('RequestManager', () => {
.equal(0);
});

it('RequestManager.getResponseAsync called twice throws', async () => {
it('RequestManager.getResponse called twice throws', async () => {
let rm = new RequestManager.RequestManager();
let requestId = '123';
rm.getResponse(requestId, undefined);
Expand Down
2 changes: 1 addition & 1 deletion libraries/swagger/ConnectorAPI.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
"Conversations"
],
"summary": "CreateConversation",
"description": "Create a new Conversation.\r\n\r\nPOST to this method with a\r\n* Bot being the bot creating the conversation\r\n* IsGroup set to true if this is not a direct message (default is false)\r\n* Array containing the members to include in the conversation\r\n\r\nThe return value is a ResourceResponse which contains a conversation id which is suitable for use\r\nin the message payload and REST API uris.\r\n\r\nMost channels only support the semantics of bots initiating a direct message conversation. An example of how to do that would be:\r\n\r\n```\r\nvar resource = await connector.conversations.CreateConversation(new ConversationParameters(){ Bot = bot, members = new ChannelAccount[] { new ChannelAccount(\"user1\") } );\r\nawait connect.Conversations.SendToConversationAsync(resource.Id, new Activity() ... ) ;\r\n\r\n```",
"description": "Create a new Conversation.\r\n\r\nPOST to this method with a\r\n* Bot being the bot creating the conversation\r\n* IsGroup set to true if this is not a direct message (default is false)\r\n* Array containing the members to include in the conversation\r\n\r\nThe return value is a ResourceResponse which contains a conversation id which is suitable for use\r\nin the message payload and REST API uris.\r\n\r\nMost channels only support the semantics of bots initiating a direct message conversation. An example of how to do that would be:\r\n\r\n```\r\nvar resource = await connector.conversations.createConversation({\r\n bot,\r\n members: [{ id: 'user1' }]\r\n});\r\nawait connector.conversations.sendToConversation(resource.Id, ... );```",
stevengum marked this conversation as resolved.
Show resolved Hide resolved
"operationId": "Conversations_CreateConversation",
"consumes": [
"application/json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class AdaptiveCardsBot extends TeamsActivityHandler {
}

protected async handleTeamsTaskModuleFetch(context: TurnContext, taskModuleRequest: TaskModuleRequest): Promise<TaskModuleResponse> {
await context.sendActivity(MessageFactory.text(`handleTeamsTaskModuleFetchAsync TaskModuleRequest: ${JSON.stringify(taskModuleRequest)}`));
await context.sendActivity(MessageFactory.text(`handleTeamsTaskModuleFetch TaskModuleRequest: ${JSON.stringify(taskModuleRequest)}`));

/**
* The following line disables the lint rules for the Adaptive Card so that users can
Expand Down
2 changes: 1 addition & 1 deletion libraries/teams-scenarios/integrationBot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ npm start
- Works in personal, group chat and teams
- On a Teams channel, group chat or personal chat with the bot installed, type "@IntegrationBottask module". The "task module" is the command sent to the bot.
- The bot should respond with Task Module Invocation Hero Card.
- Click on the Adaptive Card button. A task module popup shows up, type some text and click on Submit button. Bot should reply with 'Thanks' inside the popup and also with something like 'handleTeamsTaskModuleFetchAsync Value: {"data":{"usertext":"<<USER TEXT>>"},"context":{"theme":"dark"}}'.
- Click on the Adaptive Card button. A task module popup shows up, type some text and click on Submit button. Bot should reply with 'Thanks' inside the popup and also with something like 'handleTeamsTaskModuleFetch Value: {"data":{"usertext":"<<USER TEXT>>"},"context":{"theme":"dark"}}'.

- Search Based Messaging Extension
- Type @IntegrationBothello on the search box and hit enter. There should be three hero cards displayed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export class IntegrationBot extends TeamsActivityHandler {
}

protected async handleTeamsTaskModuleFetch(context: TurnContext, taskModuleRequest: TaskModuleRequest): Promise<TaskModuleResponse> {
var reply = MessageFactory.text("handleTeamsTaskModuleFetchAsync TaskModuleRequest" + JSON.stringify(taskModuleRequest));
var reply = MessageFactory.text("handleTeamsTaskModuleFetch TaskModuleRequest" + JSON.stringify(taskModuleRequest));
await context.sendActivity(reply);

return {
Expand All @@ -278,7 +278,7 @@ export class IntegrationBot extends TeamsActivityHandler {
}

protected async handleTeamsTaskModuleSubmit(context: TurnContext, taskModuleRequest: TaskModuleRequest): Promise<TaskModuleResponse> {
var reply = MessageFactory.text("handleTeamsTaskModuleFetchAsync Value: " + JSON.stringify(taskModuleRequest));
var reply = MessageFactory.text("handleTeamsTaskModuleSubmit Value: " + JSON.stringify(taskModuleRequest));
await context.sendActivity(reply);

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class MessagingExtensionAuthBot extends TeamsActivityHandler {
}
else
{
await context.sendActivity("handleTeamsTaskModuleFetchAsync called without 'state' in Activity.Value");
await context.sendActivity("handleTeamsTaskModuleFetch called without 'state' in Activity.Value");
return null;
}
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/teams-scenarios/taskModule/src/taskModuleBot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class TaskModuleBot extends TeamsActivityHandler {
}

protected async handleTeamsTaskModuleFetch(context: TurnContext, taskModuleRequest: TaskModuleRequest): Promise<TaskModuleResponse> {
var reply = MessageFactory.text("handleTeamsTaskModuleFetchAsync TaskModuleRequest" + JSON.stringify(taskModuleRequest));
var reply = MessageFactory.text("handleTeamsTaskModuleFetch TaskModuleRequest" + JSON.stringify(taskModuleRequest));
await context.sendActivity(reply);

return {
Expand Down