From 751ff5045c00a55cf9236cf971f47d5ca04ebbba Mon Sep 17 00:00:00 2001 From: cbouvard Date: Thu, 24 Sep 2020 09:31:46 +0200 Subject: [PATCH] copy user from vars in line translation to Activity to propage user in send middleware --- packages/botkit/src/conversation.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/botkit/src/conversation.ts b/packages/botkit/src/conversation.ts index c3b5eb914..ca496f2eb 100644 --- a/packages/botkit/src/conversation.ts +++ b/packages/botkit/src/conversation.ts @@ -865,6 +865,11 @@ export class BotkitConversation extends Dialog { }; } + // copy user ID from vars (in order to have it in send middleware) + if (!outgoing.user && vars && vars.user) { + outgoing.user = vars.user; + } + /*******************************************************************************************************************/ // Handle template token replacements if (outgoing.text) {