Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dce74ae7d5 | ||
|
|
871c509493 | ||
|
|
9333470e3b | ||
|
|
0c108f5232 | ||
|
|
39d298c867 | ||
|
|
376e804a28 | ||
|
|
79e5c0589d | ||
|
|
f6679b7368 | ||
|
|
a3c0b86b67 | ||
|
|
c8f48dd62b | ||
|
|
aed157697a |
No files matched your search
@@ -24,7 +24,7 @@ export class WebJSEngineConfigService {
|
||||
|
||||
getCacheType(): 'local' | 'none' {
|
||||
const cacheType = this.configService
|
||||
.get<string>('WAHA_WEBJS_CACHE_TYPE', 'local')
|
||||
.get<string>('WAHA_WEBJS_CACHE_TYPE', 'none')
|
||||
.toLowerCase();
|
||||
if (cacheType != 'local' && cacheType != 'none') {
|
||||
throw new Error(
|
||||
|
||||
@@ -17,6 +17,7 @@ import makeWASocket, {
|
||||
normalizeMessageContent,
|
||||
PresenceData,
|
||||
proto,
|
||||
SocketConfig,
|
||||
WAMessageContent,
|
||||
WAMessageKey,
|
||||
WAMessageUpdate,
|
||||
@@ -194,6 +195,7 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
|
||||
private autoRestartJob: SinglePeriodicJobRunner;
|
||||
private msgRetryCounterCache: NodeCache;
|
||||
private placeholderResendCache: NodeCache;
|
||||
protected engineLogger: BaileysLogger;
|
||||
|
||||
private authNOWEBStore: any;
|
||||
@@ -213,6 +215,10 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
stdTTL: 60 * 60, // 1 hour
|
||||
useClones: false,
|
||||
});
|
||||
this.placeholderResendCache = new NodeCache({
|
||||
stdTTL: 60 * 60, // 1 hour
|
||||
useClones: false,
|
||||
});
|
||||
|
||||
this.engineLogger = this.loggerBuilder.child({
|
||||
name: 'NOWEBEngine',
|
||||
@@ -252,7 +258,7 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
await this.sock?.logout();
|
||||
}
|
||||
|
||||
getSocketConfig(agent, state): any {
|
||||
getSocketConfig(agent, state): Partial<SocketConfig> {
|
||||
const fullSyncEnabled = this.sessionConfig?.noweb?.store?.fullSync || false;
|
||||
const browser = fullSyncEnabled
|
||||
? Browsers.ubuntu('Desktop')
|
||||
@@ -278,6 +284,7 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
getMessage: (key) => this.getMessage(key),
|
||||
syncFullHistory: fullSyncEnabled,
|
||||
msgRetryCounterCache: this.msgRetryCounterCache,
|
||||
placeholderResendCache: this.placeholderResendCache,
|
||||
markOnlineOnConnect: markOnlineOnConnect,
|
||||
};
|
||||
}
|
||||
@@ -291,7 +298,10 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
}
|
||||
const { state, saveCreds } = this.authNOWEBStore;
|
||||
const agent = this.makeAgent();
|
||||
const socketConfig = this.getSocketConfig(agent, state);
|
||||
const socketConfig: SocketConfig = this.getSocketConfig(
|
||||
agent,
|
||||
state,
|
||||
) as SocketConfig;
|
||||
const sock = makeWASocket(socketConfig);
|
||||
sock.ev.on('creds.update', saveCreds);
|
||||
return sock;
|
||||
|
||||
@@ -144,7 +144,7 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
const path = this.getClassDirName();
|
||||
const webVersion =
|
||||
this.engineConfig?.webVersion || '2.3000.1018072227-alpha';
|
||||
const cacheType = this.engineConfig?.cacheType || 'local';
|
||||
const cacheType = this.engineConfig?.cacheType || 'none';
|
||||
this.logger.info(`Using cache type: '${cacheType}'`);
|
||||
if (cacheType === 'local') {
|
||||
this.logger.info(`Using web version: '${webVersion}'`);
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ export function getEngineName(): string {
|
||||
}
|
||||
|
||||
export const VERSION: WAHAEnvironment = {
|
||||
version: '2024.11.7',
|
||||
version: '2024.11.11',
|
||||
engine: getEngineName(),
|
||||
tier: getWAHAVersion(),
|
||||
browser: getBrowserExecutablePath(),
|
||||
|
||||
@@ -7,7 +7,7 @@ __metadata:
|
||||
|
||||
"@adiwajshing/baileys@github:devlikeapro/Baileys#fork-master-channels-678":
|
||||
version: 6.7.8
|
||||
resolution: "@adiwajshing/baileys@https://github.com/devlikeapro/Baileys.git#commit=e2d6246da89a4775a8482fbe8de2a42b8421516d"
|
||||
resolution: "@adiwajshing/baileys@https://github.com/devlikeapro/Baileys.git#commit=26ec38da416e49b111bd67f3a33e92b03c962494"
|
||||
dependencies:
|
||||
"@adiwajshing/keyed-db": ^0.2.4
|
||||
"@hapi/boom": ^9.1.3
|
||||
@@ -39,7 +39,7 @@ __metadata:
|
||||
optional: true
|
||||
sharp:
|
||||
optional: true
|
||||
checksum: 43ac116fcc3eca176ff036a296c99d8be39bdcaafb788fb65305ee06d59060f0b8b8d5dee8596d9dca9794843dd76e90769e5acfa6d14ff55ad2a0f2616686e3
|
||||
checksum: 290834568315317c42d625d8a0974f0b65f6c83a4f5ae8398e2c3155edc8969f33b3e60325a7eb22a28aca446fd83b0ad5367e2f285ca9352fa73c8a0437b75e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -12394,7 +12394,7 @@ __metadata:
|
||||
|
||||
"whatsapp-web.js@github:devlikeapro/whatsapp-web.js#fork-main-channels":
|
||||
version: 1.26.0
|
||||
resolution: "whatsapp-web.js@https://github.com/devlikeapro/whatsapp-web.js.git#commit=aa90f7378659a237f30cda6d368359a1f81904dc"
|
||||
resolution: "whatsapp-web.js@https://github.com/devlikeapro/whatsapp-web.js.git#commit=299ac267cb17dbfdafda0fb88c9f9ccf37fe39bc"
|
||||
dependencies:
|
||||
"@pedroslopez/moduleraid": ^5.0.2
|
||||
archiver: ^5.3.1
|
||||
@@ -12412,7 +12412,7 @@ __metadata:
|
||||
optional: true
|
||||
unzipper:
|
||||
optional: true
|
||||
checksum: 7c914e9cdd4a25c967e057d0cb5019973f0556f6220320e4bcbc0666669801b92abf97c2cc783762ef462d0006123953e233136f457689ebac395260fe69a5fc
|
||||
checksum: 15201ef0fb16f379d96a8c3089344445e16d282fddb2d113a1d302fb03a0899b73ee41e2e181485706ff2c8657d33f987b2797981ef4d9b9fbf09023c6bab170
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in new issue
Block a user