Skip to content

Commit ae29089

Browse files
Kyle Delaneystevengum
Kyle Delaney
andauthored
Fix erroneous Async suffix in some comments, error messages, etc. (#2476)
* Fix erroneous Async suffix in some comments, error messages, etc. * Update libraries/botframework-connector/src/connectorApi/operations/conversations.ts Co-authored-by: Steven Gum <[email protected]>
1 parent db6d820 commit ae29089

File tree

14 files changed

+20
-19
lines changed

14 files changed

+20
-19
lines changed

libraries/botbuilder-core/src/skills/skillConversationIdFactoryBase.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export abstract class SkillConversationIdFactoryBase {
5050

5151
/**
5252
* Gets the SkillConversationReference created using createSkillConversationId() for a skillConversationId.
53-
* @param skillConversationId Gets the SkillConversationReference used during CreateSkillConversationIdAsync for a skillConversationId.
53+
* @param skillConversationId Gets the SkillConversationReference used during createSkillConversationId for a skillConversationId.
5454
*/
5555
public getSkillConversationReference(skillConversationId: string): Promise<SkillConversationReference> {
5656
throw new Error('Not Implemented');

libraries/botbuilder-dialogs/src/dialogSet.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export class DialogSet {
161161
*/
162162
public async createContext(context: TurnContext): Promise<DialogContext> {
163163
if (!this.dialogState) {
164-
throw new Error(`DialogSet.createContextAsync(): the dialog set was not bound to a stateProperty when constructed.`);
164+
throw new Error(`DialogSet.createContext(): the dialog set was not bound to a stateProperty when constructed.`);
165165
}
166166
const state: DialogState = await this.dialogState.get(context, { dialogStack: [] } as DialogState);
167167

libraries/botbuilder-dialogs/src/skillDialog.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export class SkillDialog extends Dialog<Partial<BeginSkillDialogOptions>> {
110110
public async endDialog(context: TurnContext, instance: DialogInstance, reason: DialogReason): Promise<void> {
111111
// Send of of conversation to the skill if the dialog has been cancelled.
112112
if (reason == DialogReason.cancelCalled || reason == DialogReason.replaceCalled) {
113-
await context.sendTraceActivity(`${ this.id }.EndDialogAsync()`, undefined, undefined, `ActivityType: ${ context.activity.type }`);
113+
await context.sendTraceActivity(`${ this.id }.endDialog()`, undefined, undefined, `ActivityType: ${ context.activity.type }`);
114114

115115
const reference = TurnContext.getConversationReference(context.activity);
116116
// Apply conversation reference and common properties from incoming activity before sending.

libraries/botbuilder-dialogs/tests/dialogSet.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe('DialogSet', function () {
3737
try {
3838
const dc = await dialogs.createContext({ type: 'message', text: 'hi' });
3939
} catch (err) {
40-
assert(err.message === 'DialogSet.createContextAsync(): the dialog set was not bound to a stateProperty when constructed.', `unexpected error thrown: ${ err.message }`);
40+
assert(err.message === 'DialogSet.createContext(): the dialog set was not bound to a stateProperty when constructed.', `unexpected error thrown: ${ err.message }`);
4141
}
4242
});
4343

libraries/botframework-config/tests/loadAndSave.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ describe("LoadAndSaveTests", () => {
8181

8282
try {
8383
config.saveAsSync(null, secret);
84-
assert.fail("SaveAsAsync with null should throw");
84+
assert.fail("saveAsSync with null should throw");
8585
} catch (err) { }
8686

8787
try {
8888
await config.saveAs(null, secret);
89-
assert.fail("SaveAsAsync with null should throw");
89+
assert.fail("saveAs with null should throw");
9090
} catch (err) { }
9191
});
9292

libraries/botframework-connector/src/connectorApi/operations/conversations.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,11 @@ export class Conversations {
7373
* example of how to do that would be:
7474
*
7575
* ```
76-
* var resource = await connector.conversations.CreateConversation(new ConversationParameters(){
77-
* Bot = bot, members = new ChannelAccount[] { new ChannelAccount("user1") } );
78-
* await connect.Conversations.SendToConversationAsync(resource.Id, new Activity() ... ) ;
79-
*
76+
* const resource = await connector.conversations.createConversation({
77+
* bot,
78+
* members: [{ id: 'user1' }]
79+
* });
80+
* await connector.conversations.sendToConversation(resource.Id, ... );
8081
* ```
8182
* @summary CreateConversation
8283
* @param parameters Parameters to create the conversation from

libraries/botframework-streaming/src/webSocket/webSocketTransport.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export class WebSocketTransport implements ITransportSender, ITransportReceiver
8282
*/
8383
public async receive(count: number): Promise<INodeBuffer> {
8484
if (this._activeReceiveResolve) {
85-
throw new Error('Cannot call receiveAsync more than once before it has returned.');
85+
throw new Error('Cannot call receive more than once before it has returned.');
8686
}
8787

8888
this._activeReceiveCount = count;

libraries/botframework-streaming/tests/RequestManager.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe('RequestManager', () => {
1313
.equal(0);
1414
});
1515

16-
it('RequestManager.getResponseAsync called twice throws', async () => {
16+
it('RequestManager.getResponse called twice throws', async () => {
1717
let rm = new RequestManager.RequestManager();
1818
let requestId = '123';
1919
rm.getResponse(requestId, undefined);

libraries/swagger/ConnectorAPI.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
"Conversations"
159159
],
160160
"summary": "CreateConversation",
161-
"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```",
161+
"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, ... );```",
162162
"operationId": "Conversations_CreateConversation",
163163
"consumes": [
164164
"application/json",

libraries/teams-scenarios/adaptiveCards/src/adaptiveCardsBot.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export class AdaptiveCardsBot extends TeamsActivityHandler {
6868
}
6969

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

7373
/**
7474
* The following line disables the lint rules for the Adaptive Card so that users can

libraries/teams-scenarios/integrationBot/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ npm start
279279
- Works in personal, group chat and teams
280280
- 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.
281281
- The bot should respond with Task Module Invocation Hero Card.
282-
- 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"}}'.
282+
- 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"}}'.
283283

284284
- Search Based Messaging Extension
285285
- Type @IntegrationBothello on the search box and hit enter. There should be three hero cards displayed.

libraries/teams-scenarios/integrationBot/src/integrationBot.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ export class IntegrationBot extends TeamsActivityHandler {
261261
}
262262

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

267267
return {
@@ -278,7 +278,7 @@ export class IntegrationBot extends TeamsActivityHandler {
278278
}
279279

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

284284
return {

libraries/teams-scenarios/messagingExtensionAuth/src/messagingExtensionAuthBot.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export class MessagingExtensionAuthBot extends TeamsActivityHandler {
127127
}
128128
else
129129
{
130-
await context.sendActivity("handleTeamsTaskModuleFetchAsync called without 'state' in Activity.Value");
130+
await context.sendActivity("handleTeamsTaskModuleFetch called without 'state' in Activity.Value");
131131
return null;
132132
}
133133
}

libraries/teams-scenarios/taskModule/src/taskModuleBot.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class TaskModuleBot extends TeamsActivityHandler {
3030
}
3131

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

3636
return {

0 commit comments

Comments
 (0)