feat(DialogKeywords): integrate MinIO client for file handling in gbcluster mode
Some checks failed
GBCI / build (push) Failing after 4m4s

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2025-04-15 13:46:02 -03:00
parent 0a69ff1d8b
commit 7035c6799f
2 changed files with 11 additions and 4 deletions

View file

@ -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);

View file

@ -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,