From e08a02bec0d0da9bd81a70524d72833972896558 Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Sat, 24 Feb 2024 15:39:16 -0300 Subject: [PATCH] fix(basic.gblib): SEND FILE fix for sub directories. --- packages/basic.gblib/services/DialogKeywords.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/basic.gblib/services/DialogKeywords.ts b/packages/basic.gblib/services/DialogKeywords.ts index dc8daa9f..b3938788 100644 --- a/packages/basic.gblib/services/DialogKeywords.ts +++ b/packages/basic.gblib/services/DialogKeywords.ts @@ -1340,13 +1340,13 @@ export class DialogKeywords { const gbaiName = DialogKeywords.getGBAIPath(min.botId); let { baseUrl, client } = await GBDeployer.internalGetDriveClient(min); - let url = urlJoin('/', gbaiName, `${min.botId}.gbdrive`, filename); - GBLog.info(`BASIC: Direct send from .gbdrive: ${url} to ${mobile}.`); + const fileUrl = urlJoin('/', gbaiName, `${min.botId}.gbdrive`, filename); + GBLog.info(`BASIC: Direct send from .gbdrive: ${fileUrl} to ${mobile}.`); const sys = new SystemKeywords(); - const pathOnly = url.substring(0, url.lastIndexOf('/')); - const fileOnly = url.substring(url.lastIndexOf('/') + 1); + const pathOnly = fileUrl.substring(0, fileUrl.lastIndexOf('/')); + const fileOnly = fileUrl.substring(fileUrl.lastIndexOf('/') + 1); let template = await sys.internalGetDocument(client, baseUrl, pathOnly, fileOnly);