From da650ccdef7c5b5fa3882f7c07467c931f517f9d Mon Sep 17 00:00:00 2001 From: devlikepro Date: Sun, 18 Aug 2024 14:21:33 +0700 Subject: [PATCH] [core] Fix get chats with limit offset properties fixes #486 --- src/core/engines/webjs/WebjsClient.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/engines/webjs/WebjsClient.ts b/src/core/engines/webjs/WebjsClient.ts index 9825a451..770ecb64 100644 --- a/src/core/engines/webjs/WebjsClient.ts +++ b/src/core/engines/webjs/WebjsClient.ts @@ -7,8 +7,11 @@ const { LoadUtils } = require('./WahaInjected'); const ChatFactory = require('whatsapp-web.js/src/factories/ChatFactory'); export class WebjsClient extends Client { - async initialize() { - await super.initialize(); + async inject() { + // Even tho this.inject is not defined as interface in Client.ts + // We can still call and override it + // @ts-ignore + await super.inject(); //Load util functions (serializers, helper functions) await this.pupPage.evaluate(LoadUtils); }