Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
linter cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
benbrown committed Aug 25, 2020
1 parent 93ab723 commit 29ed10c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/botbuilder-adapter-slack/src/slack_adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class SlackAdapter extends BotAdapter {

this.middlewares = {
spawn: [
async (bot, next) => {
async (bot, next): Promise<void> => {
// make the Slack API available to all bot instances.
bot.api = await this.getAPI(bot.getConfig('activity')).catch((err) => {
debug('An error occurred while trying to get API creds for team', err);
Expand Down
4 changes: 3 additions & 1 deletion packages/botbuilder-adapter-web/src/web_adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ export class WebAdapter extends BotAdapter {
return ws.terminate();
}
ws.isAlive = false;
ws.ping('', false, () =>{});
ws.ping('', false, () => {
// noop
});
});
}, 30000);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/botbuilder-adapter-webex/src/botworker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class WebexBotWorker extends BotWorker {
channelId: 'webex'
});
}

/**
* Switch a bot's context into a specific thread within a room.
* After calling this method, messages sent with `bot.say` and any dialogs started with `bot.beginDialog` will occur in this new context.
Expand Down Expand Up @@ -137,7 +137,7 @@ export class WebexBotWorker extends BotWorker {
*/
public async replyInThread(src: any, resp: any): Promise<any> {
// set parentId to src.id
resp.parentId = src.parentId ? src.parentId : src.id;
resp.parentId = src.parentId ? src.parentId : src.id;
return this.reply(src, resp);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/botbuilder-adapter-webex/src/webex_adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,15 +393,15 @@ export class WebexAdapter extends BotAdapter {
} else if (activity.channelData && activity.channelData.attachments) {
message.attachments = activity.channelData.attachments;
}

// @ts-ignore ignore this webex specific field
if (activity.conversation && activity.conversation.parentId) {
// @ts-ignore ignore this webex specific field
message.parentId = activity.conversation.parentId;
} else if (activity.channelData && activity.channelData.parentId) {
message.parentId = activity.channelData.parentId;
}

const response = await this._api.messages.create(message);

responses.push(response);
Expand Down
3 changes: 1 addition & 2 deletions packages/botkit/src/conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,6 @@ export class BotkitConversation<O extends object = {}> extends Dialog<O> {
}

if (line.action) {

const res = await this.handleAction(line, dc, step);
if (res !== false) {
return res;
Expand Down Expand Up @@ -859,7 +858,7 @@ export class BotkitConversation<O extends object = {}> extends Dialog<O> {
// copy all the values in channelData fields
if (line.channelData && Object.keys(line.channelData).length > 0) {
const channelDataParsed = this.parseTemplatesRecursive(JSON.parse(JSON.stringify(line.channelData)), vars);

outgoing.channelData = {
...outgoing.channelData,
...channelDataParsed
Expand Down
2 changes: 1 addition & 1 deletion packages/botkit/src/teamsHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class TeamsBotWorker extends BotWorker {
* @param taskInfo an object in the form {type, value}
*/
public async replyWithTaskInfo(message: BotkitMessage, taskInfo: any): Promise<any> {
if (!taskInfo || taskInfo == {}) {
if (!taskInfo || taskInfo === {}) {
// send a null response back
taskInfo = {
type: 'message',
Expand Down

0 comments on commit 29ed10c

Please sign in to comment.