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

Commit

Permalink
Update conversation.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ashitikov authored Jun 10, 2020
1 parent 848712b commit 6573265
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/botkit/src/conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,15 @@ 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
};
}

for (const key in line.channelData) {
outgoing.channelData = this.parseTemplatesRecursive(JSON.parse(JSON.stringify(line.channelData)), vars)
}
Expand Down

0 comments on commit 6573265

Please sign in to comment.