Compare commits

...
3 Commits
Author SHA1 Message Date
devlikepro 79e5c0589d [core] Up NOWEB
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-11-29 14:51:16 +07:00
devlikepro f6679b7368 [core] 2024.11.9 2024-11-29 09:38:06 +07:00
devlikepro a3c0b86b67 [core] Add explicit placeholder cache 2024-11-29 09:37:49 +07:00
3 changed files with 15 additions and 5 deletions

No files matched your search

+12 -2
View File
@@ -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;
+1 -1
View File
@@ -33,7 +33,7 @@ export function getEngineName(): string {
}
export const VERSION: WAHAEnvironment = {
version: '2024.11.8',
version: '2024.11.9',
engine: getEngineName(),
tier: getWAHAVersion(),
browser: getBrowserExecutablePath(),
+2 -2
View File
@@ -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=1cb6831ab696f8fdcdbb95c0d4dc218c39156a8f"
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: 3052043e1085db9a82dd5046ab0899603fb81705e46c62b9b6234348d288bce7eb27b57b5e48eda7716159a102ee81edf30efc688b93ca898e76e74b92340e5b
languageName: node
linkType: hard