Merge branch 'develop' into main

This commit is contained in:
ricael
2025-09-17 08:50:39 -03:00
17 changed files with 3141 additions and 1496 deletions

View File

@@ -3,6 +3,8 @@ import fs from 'fs';
import i18next from 'i18next';
import path from 'path';
const __dirname = path.resolve(process.cwd(), 'src', 'utils');
const languages = ['en', 'pt-BR', 'es'];
const translationsPath = path.join(__dirname, 'translations');
const configService: ConfigService = new ConfigService();
@@ -12,8 +14,9 @@ const resources: any = {};
languages.forEach((language) => {
const languagePath = path.join(translationsPath, `${language}.json`);
if (fs.existsSync(languagePath)) {
const translationContent = fs.readFileSync(languagePath, 'utf8');
resources[language] = {
translation: require(languagePath),
translation: JSON.parse(translationContent),
};
}
});

View File

@@ -153,7 +153,7 @@ export default async function useMultiFileAuthStatePrisma(
ids.map(async (id) => {
let value = await readData(`${type}-${id}`);
if (type === 'app-state-sync-key' && value) {
value = proto.Message.AppStateSyncKeyData.fromObject(value);
value = proto.Message.AppStateSyncKeyData.create(value);
}
data[id] = value;

View File

@@ -100,7 +100,7 @@ export class AuthStateProvider {
ids.map(async (id) => {
let value = await readData(`${type}-${id}`);
if (type === 'app-state-sync-key' && value) {
value = proto.Message.AppStateSyncKeyData.fromObject(value);
value = proto.Message.AppStateSyncKeyData.create(value);
}
data[id] = value;

View File

@@ -50,7 +50,7 @@ export async function useMultiFileAuthStateRedisDb(
ids.map(async (id) => {
let value = await readData(`${type}-${id}`);
if (type === 'app-state-sync-key' && value) {
value = proto.Message.AppStateSyncKeyData.fromObject(value);
value = proto.Message.AppStateSyncKeyData.create(value);
}
data[id] = value;