diff --git a/packages/basic.gblib/services/DialogKeywords.ts b/packages/basic.gblib/services/DialogKeywords.ts index 6ae5a6cf5..f58de4bdf 100644 --- a/packages/basic.gblib/services/DialogKeywords.ts +++ b/packages/basic.gblib/services/DialogKeywords.ts @@ -1528,9 +1528,9 @@ export class DialogKeywords { const ext = path.extname(filename); - const gbaiName = GBUtil.getGBAIPath(min.botId); + - const fileUrl = urlJoin('/', gbaiName, `${min.botId}.gbdrive`, filename); + const fileUrl = urlJoin('/', `${min.botId}.gbdrive`, filename); GBLogEx.info(min, `Direct send from .gbdrive: ${fileUrl} to ${mobile}.`); const fileOnly = fileUrl.substring(fileUrl.lastIndexOf('/') + 1); diff --git a/packages/core.gbapp/services/GBMinService.ts b/packages/core.gbapp/services/GBMinService.ts index b1ae1bc3d..afdaebe77 100644 --- a/packages/core.gbapp/services/GBMinService.ts +++ b/packages/core.gbapp/services/GBMinService.ts @@ -1075,11 +1075,19 @@ export class GBMinService { let user = await sec.ensureUser(min, member.id, member.name, '', 'web', member.name, null); const userId = user.userId; const params = user.params ? JSON.parse(user.params) : {}; - + const t = new SystemKeywords(); + try { const conversationReference = JSON.stringify(TurnContext.getConversationReference(context.activity)); user = await sec.updateConversationReferenceById(user.userId, conversationReference); + const auth = min.core.getParam(min.instance, 'Enable Authentication', null); + + if (auth && await t.find({pid: pid, "users.csv", `key={member.id}`})){ + + } + + // First time processing. if (!params.loaded) { @@ -1158,7 +1166,6 @@ export class GBMinService { ); const botToken = await credentials.getToken(); const headers = { Authorization: `Bearer ${botToken}` }; - const t = new SystemKeywords(); const data = await t.getByHttp({ pid: 0, url: file.contentUrl,