From 657326596884af3b810513c491256a5146ab4ab5 Mon Sep 17 00:00:00 2001 From: Alexander Shitikov Date: Wed, 10 Jun 2020 17:21:08 +0400 Subject: [PATCH 1/7] Update conversation.ts --- packages/botkit/src/conversation.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/botkit/src/conversation.ts b/packages/botkit/src/conversation.ts index 0f0cc8ab4..79af1d90b 100644 --- a/packages/botkit/src/conversation.ts +++ b/packages/botkit/src/conversation.ts @@ -857,6 +857,15 @@ export class BotkitConversation extends Dialog { } // 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 + }; + } + for (const key in line.channelData) { outgoing.channelData = this.parseTemplatesRecursive(JSON.parse(JSON.stringify(line.channelData)), vars) } From 8bbba01b4dbdda86437402607f64d82e62c6c074 Mon Sep 17 00:00:00 2001 From: Alexander Shitikov Date: Wed, 10 Jun 2020 17:30:14 +0400 Subject: [PATCH 2/7] Update conversation.ts --- packages/botkit/src/conversation.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/botkit/src/conversation.ts b/packages/botkit/src/conversation.ts index 79af1d90b..998ab3902 100644 --- a/packages/botkit/src/conversation.ts +++ b/packages/botkit/src/conversation.ts @@ -865,10 +865,6 @@ export class BotkitConversation extends Dialog { ...channelDataParsed }; } - - for (const key in line.channelData) { - outgoing.channelData = this.parseTemplatesRecursive(JSON.parse(JSON.stringify(line.channelData)), vars) - } /*******************************************************************************************************************/ // Handle template token replacements From 6643a027225ba5e5f744a706d5d565d5fcf0e6cc Mon Sep 17 00:00:00 2001 From: Hayden Ball Date: Sat, 4 Jul 2020 19:48:07 +0100 Subject: [PATCH 3/7] Use conversations.open in place of im.open --- packages/botbuilder-adapter-slack/src/botworker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/botbuilder-adapter-slack/src/botworker.ts b/packages/botbuilder-adapter-slack/src/botworker.ts index 1a9f6f72f..7a416f5b0 100644 --- a/packages/botbuilder-adapter-slack/src/botworker.ts +++ b/packages/botbuilder-adapter-slack/src/botworker.ts @@ -100,7 +100,7 @@ export class SlackBotWorker extends BotWorker { */ public async startPrivateConversation(userId: string): Promise { // create the new IM channel - const channel: any = await this.api.im.open({ user: userId }); + const channel: any = await this.api.conversations.open({ users: userId }); if (channel.ok === true) { // now, switch contexts From e1de8d941a8e226a38b81ad65df15b072bef0876 Mon Sep 17 00:00:00 2001 From: Billy Vong Date: Sat, 8 Aug 2020 08:56:25 -0700 Subject: [PATCH 4/7] fix(docs): Fix typo in core.ts Just a simple typo fix --- packages/botkit/src/core.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/botkit/src/core.ts b/packages/botkit/src/core.ts index 3a61ca7d5..23bffcb89 100644 --- a/packages/botkit/src/core.ts +++ b/packages/botkit/src/core.ts @@ -47,7 +47,7 @@ export interface BotkitConfiguration { adapterConfig?: {[key: string]: any}; // object with stuff in it /** - * An instance of Express used to define web endpoints. If not specified, oen will be created internally. + * An instance of Express used to define web endpoints. If not specified, one will be created internally. * Note: only use your own Express if you absolutely must for some reason. Otherwise, use `controller.webserver` */ webserver?: any; From ec66a6fa0ac2e4597ab02de66bddb4791c8d1540 Mon Sep 17 00:00:00 2001 From: Vivek Singh Date: Wed, 12 Aug 2020 15:21:54 +0530 Subject: [PATCH 5/7] Add null check for channelData No null check for channelData looks like breaking changes as sometime it will not be present when we try to use context.sendActivity. Signed-off-by: Vivek Singh --- packages/botbuilder-adapter-webex/src/webex_adapter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/botbuilder-adapter-webex/src/webex_adapter.ts b/packages/botbuilder-adapter-webex/src/webex_adapter.ts index cbb44752e..70da91a01 100644 --- a/packages/botbuilder-adapter-webex/src/webex_adapter.ts +++ b/packages/botbuilder-adapter-webex/src/webex_adapter.ts @@ -398,7 +398,7 @@ export class WebexAdapter extends BotAdapter { if (activity.conversation && activity.conversation.parentId) { // @ts-ignore ignore this webex specific field message.parentId = activity.conversation.parentId; - } else if (activity.channelData.parentId) { + } else if (activity.channelData && activity.channelData.parentId) { message.parentId = activity.channelData.parentId; } From 7d5c9d0b58b1335a8d368736558aff12dd08640b Mon Sep 17 00:00:00 2001 From: Quan Pham Date: Thu, 20 Aug 2020 11:07:39 +0700 Subject: [PATCH 6/7] Add extra note for ts extension in loadModules --- packages/docs/core.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docs/core.md b/packages/docs/core.md index 1bcf77567..79af94aed 100644 --- a/packages/docs/core.md +++ b/packages/docs/core.md @@ -513,7 +513,7 @@ or one of the remixable starter kits. A Botkit application usually has 2 main components: a main app file called `bot.js` where Botkit is configured, and a folder of modules that get automatically loaded into the application. -The bot's features - all of the stuff involved in defining trigger patterns, dialogs, custom middlewares and handlers - are organized into JavaScript modules, and then loaded into the app using [controller.loadModules()](reference/core.md#loadmodules). Each feature file should contain only the code required for a specific feature. This will help to keep the project code well organized and modular. +The bot's features - all of the stuff involved in defining trigger patterns, dialogs, custom middlewares and handlers - are organized into JavaScript modules, and then loaded into the app using [controller.loadModules()](reference/core.md#loadmodules). If you are using Typescript, make sure to include `ts` extension into the second parameter as a string array (default is `['.js']`, and you probably want it to be `['.js', '.ts']`). Each feature file should contain only the code required for a specific feature. This will help to keep the project code well organized and modular. The feature modules follow the form below: From 566d709631beba2016a2c0a4fa272a126ae89fea Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Fri, 21 Aug 2020 10:43:49 -0500 Subject: [PATCH 7/7] update slack api call --- packages/botbuilder-adapter-slack/CHANGELOG.md | 4 ++++ packages/botbuilder-adapter-slack/package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/botbuilder-adapter-slack/CHANGELOG.md b/packages/botbuilder-adapter-slack/CHANGELOG.md index 6d4447792..ba2a15a37 100644 --- a/packages/botbuilder-adapter-slack/CHANGELOG.md +++ b/packages/botbuilder-adapter-slack/CHANGELOG.md @@ -1,5 +1,9 @@ # botbuilder-adapter-slack changelog +# 1.0.12 + +* Adjust startPrivateConversation to use converations.open instead of im.open + # 1.0.11 * Update dependencies to Botkit 4.9, Bot Framework 4.9 diff --git a/packages/botbuilder-adapter-slack/package.json b/packages/botbuilder-adapter-slack/package.json index 19ddd6ed1..2c913f2a1 100644 --- a/packages/botbuilder-adapter-slack/package.json +++ b/packages/botbuilder-adapter-slack/package.json @@ -1,6 +1,6 @@ { "name": "botbuilder-adapter-slack", - "version": "1.0.11", + "version": "1.0.12", "description": "Connect Botkit or BotBuilder to Slack", "main": "./lib/index.js", "typings": "./lib/index.d.ts",