[core] markOnline NOWEB

fix #412
This commit is contained in:
devlikepro committed 2024-09-18 13:55:24 +07:00
1 parent d7a699c714
commit 743e4f3e31
2 files changed
+11

No files matched your search

@@ -212,6 +212,10 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
const browser = fullSyncEnabled
? Browsers.ubuntu('Desktop')
: Browsers.ubuntu('Chrome');
let markOnlineOnConnect = this.sessionConfig?.noweb?.markOnline;
if (markOnlineOnConnect == undefined) {
markOnlineOnConnect = true;
}
return {
agent: agent,
fetchAgent: agent,
@@ -229,6 +233,7 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
getMessage: (key) => this.getMessage(key),
syncFullHistory: fullSyncEnabled,
msgRetryCounterCache: this.msgRetryCounterCache,
markOnlineOnConnect: markOnlineOnConnect,
};
}
+6
View File
@@ -80,6 +80,12 @@ export class NowebConfig {
@Type(() => NowebStoreConfig)
@IsOptional()
store?: NowebStoreConfig;
@ApiProperty({
description: 'Mark the session as online when it connects to the server.',
})
@IsBoolean()
markOnline: boolean = true;
}
export class SessionConfig {