fix:修复某些登录问题

This commit is contained in:
Jerry 2025-09-30 23:42:11 +08:00
parent 61cec10da1
commit 1b447b29fa
2 changed files with 2 additions and 2 deletions

View File

@ -225,7 +225,7 @@ export default class LoginService extends plugin {
} }
const qrPath = await loginInstance.login(qq, nickname); const qrPath = await loginInstance.login(qq, nickname);
if (qrPath) { if (qrPath || qrPath !== 'none') {
e.reply(segment.image(qrPath), true); e.reply(segment.image(qrPath), true);
const timerKey = `login:timer:${qq}`; const timerKey = `login:timer:${qq}`;
await redis.set(timerKey, 120, 'pending'); await redis.set(timerKey, 120, 'pending');

View File

@ -43,7 +43,7 @@ export default class NapcatService {
} }
} }
if (!fs.existsSync(shFile)) { 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 }); fs.writeFileSync(shFile, scriptContent, { mode: 0o755 });
} }
try { try {