From ce1e42bb171edb3a84b5c8e81a879b50cf5f4959 Mon Sep 17 00:00:00 2001 From: devlikepro Date: Wed, 30 Sep 2026 15:19:51 +0700 Subject: [PATCH] up(WEBJS): fix set push name --- src/core/engines/webjs/WebjsClientCore.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/core/engines/webjs/WebjsClientCore.ts b/src/core/engines/webjs/WebjsClientCore.ts index b4cb5577..ec3a4753 100644 --- a/src/core/engines/webjs/WebjsClientCore.ts +++ b/src/core/engines/webjs/WebjsClientCore.ts @@ -338,9 +338,14 @@ export class WebjsClientCore extends Client { async setPushName(name: string) { await this.ensureWahaInjected(); await this.pupPage.evaluate(async (pushName) => { - return await window - .require('WAWebSetPushnameConnAction') - .setPushname(pushName); + // @ts-ignore + const WAWebSetPushnameConnAction = await window.WWebJS.requireLazy( + 'WAWebSetPushnameConnAction', + { + 'WAWebProfileDrawer.react': 'WAWebProfileDrawerLoadableRequireBundle', + }, + ); + return await WAWebSetPushnameConnAction.setPushname(pushName); }, name); if (this.info) { this.info.pushname = name;