From c76c46ede7ca45f2952ed5e7e61272bc8843016a Mon Sep 17 00:00:00 2001 From: "me@rodrigorodriguez.com" Date: Sun, 29 Sep 2024 21:52:07 -0300 Subject: [PATCH] fix(all): Templates OK. --- packages/core.gbapp/services/GBMinService.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/core.gbapp/services/GBMinService.ts b/packages/core.gbapp/services/GBMinService.ts index 028d235e..94a388b7 100644 --- a/packages/core.gbapp/services/GBMinService.ts +++ b/packages/core.gbapp/services/GBMinService.ts @@ -1095,15 +1095,13 @@ export class GBMinService { }); } } - + let pid = WhatsappDirectLine.pidByNumber[member.id]; - let recipient = context.activity?.recipient?.id; - - if (!pid && recipient !== min.botId) { + GBLogEx.info(min, `Receiver: ${member.id} - pid: ${pid}.`); + if (!pid) { pid = GBVMService.createProcessInfo(user, min, step.context.activity.channelId, null, step); } - step.context.activity['pid'] = pid; - + // Required for MSTEAMS handling of persisted conversations. if (step.context.activity.channelId === 'msteams') { @@ -1145,11 +1143,14 @@ export class GBMinService { min, `Auto start (teams) dialog is now being called: ${startDialog} for ${min.instance.botId}...` ); + await GBVMService.callVM(startDialog.toLowerCase(), min, step, pid); } } } + step.context.activity['pid'] = pid; + // Required for F0 handling of persisted conversations. GBLogEx.info(