fix: 支持新版 ChatGPT 登录验证码邮件匹配

This commit is contained in:
Ryan Liu
2026-04-24 18:06:13 +08:00
parent 9c1c0bc076
commit 70f3ffb266
13 changed files with 95 additions and 4 deletions
+14
View File
@@ -81,6 +81,20 @@ return { readOpenedMailBody, extractVerificationCode };
assert.equal(api.extractVerificationCode(bodyText), '731091');
});
test('extractVerificationCode matches the new suspicious log-in mail body', () => {
const bundle = [
extractFunction('extractVerificationCode'),
].join('\n');
const api = new Function(`
${bundle}
return { extractVerificationCode };
`)();
const bodyText = 'ChatGPT Log-in Code\nWe noticed a suspicious log-in on your account. If that was you, enter this code:\n\n982219';
assert.equal(api.extractVerificationCode(bodyText), '982219');
});
test('readOpenedMailBody ignores conversation list rows when no detail pane is open', () => {
const bundle = [
extractFunction('normalizeText'),