Compare commits

..
3 Commits
Author SHA1 Message Date
devlikepro 57672a2a9c [core] 2024.10.3
Release / amd64 - chrome - chrome (push) Canceled after 0s
Release / amd64 - chromium - latest (push) Canceled after 0s
Release / linux/arm64 - chromium - arm (push) Canceled after 0s
Release / amd64 - none - noweb (push) Canceled after 0s
Release / linux/arm64 - none - noweb-arm (push) Canceled after 0s
2024-10-03 14:50:52 +07:00
devlikepro 0ae594b198 [core] Add more logging in WEBJS 2024-10-03 14:50:27 +07:00
devlikepro 14a7e1c72d .env.example 2024-10-01 18:35:46 +07:00
4 changed files with 9 additions and 8 deletions

No files matched your search

View File
File renamed without changes.
+1
View File
@@ -1,3 +1,4 @@
.env
*.heapsnapshot
.yarn
example.ts
+7 -7
View File
@@ -305,29 +305,29 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
this.logger.info(`Session '${this.name}' is ready!`);
});
this.whatsapp.on(Events.AUTHENTICATED, () => {
this.whatsapp.on(Events.AUTHENTICATED, (args) => {
this.status = WAHASessionStatus.WORKING;
this.qr.save('');
this.logger.info(`Session '${this.name}' has been authenticated!`);
this.logger.info({ args: args }, `Session has been authenticated!`);
});
this.whatsapp.on(Events.AUTHENTICATION_FAILURE, () => {
this.whatsapp.on(Events.AUTHENTICATION_FAILURE, (args) => {
this.status = WAHASessionStatus.FAILED;
this.qr.save('');
this.logger.info(`Session '${this.name}' has been disconnected!`);
this.logger.info({ args: args }, `Session has failed to authenticate!`);
});
this.whatsapp.on(Events.DISCONNECTED, () => {
this.whatsapp.on(Events.DISCONNECTED, (args) => {
this.status = WAHASessionStatus.FAILED;
this.qr.save('');
this.logger.info(`Session '${this.name}' has been disconnected!`);
this.logger.info({ args: args }, `Session has been disconnected!`);
});
this.whatsapp.on(Events.STATE_CHANGED, (state: WAState) => {
const badStates = [WAState.OPENING, WAState.TIMEOUT];
const log = this.logger.child({ state: state, event: 'change_state' });
log.debug('Session engine state changed');
log.info('Session engine state changed');
if (!badStates.includes(state)) {
return;
}
+1 -1
View File
@@ -33,7 +33,7 @@ export function getEngineName(): string {
}
export const VERSION: WAHAEnvironment = {
version: '2024.10.2',
version: '2024.10.3',
engine: getEngineName(),
tier: getWAHAVersion(),
browser: getBrowserExecutablePath(),