From 1b447b29fa3196bc2e754e713ef6253f80874e53 Mon Sep 17 00:00:00 2001 From: Jerryplusy Date: Tue, 30 Sep 2025 23:42:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E6=9F=90=E4=BA=9B?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/login.js | 2 +- lib/login/napcat.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/login.js b/apps/login.js index 6afba99..d8d61b2 100644 --- a/apps/login.js +++ b/apps/login.js @@ -225,7 +225,7 @@ export default class LoginService extends plugin { } const qrPath = await loginInstance.login(qq, nickname); - if (qrPath) { + if (qrPath || qrPath !== 'none') { e.reply(segment.image(qrPath), true); const timerKey = `login:timer:${qq}`; await redis.set(timerKey, 120, 'pending'); diff --git a/lib/login/napcat.js b/lib/login/napcat.js index fc5dc79..f175717 100644 --- a/lib/login/napcat.js +++ b/lib/login/napcat.js @@ -43,7 +43,7 @@ export default class NapcatService { } } if (!fs.existsSync(shFile)) { - const scriptContent = `#!/bin/bash\ncd "${this.basePath}"\n./napcat --qq ${qq}\n`; + const scriptContent = `#!/bin/bash\nxvfb-run -a qq --no-sandbox -q ${qq}\n`; fs.writeFileSync(shFile, scriptContent, { mode: 0o755 }); } try {