fix: 收敛 2925 邮箱修复范围

- 回退非必要的 2925 行为改动,仅保留已验证有效的修复
- 保留 bounce 转发地址解析、中文日期解析与邮箱页复用时的 ready 恢复
- 同步最小化测试断言,保持当前代码与测试一致
This commit is contained in:
Isulew
2026-04-28 00:50:29 +08:00
parent 941102200f
commit cf2a720531
9 changed files with 20 additions and 37 deletions
+10 -10
View File
@@ -537,6 +537,16 @@
}
}
if (typeof ensureContentScriptReadyOnTab === 'function') {
await ensureContentScriptReadyOnTab(MAIL2925_SOURCE, tabId, {
inject: MAIL2925_INJECT,
injectSource: MAIL2925_INJECT_SOURCE,
timeoutMs: 20000,
retryDelayMs: 800,
logMessage: '步骤 0:2925 登录页内容脚本未就绪,正在等待页面稳定后继续登录...',
});
}
if (!forceRelogin && !isMail2925LoginUrl(openedUrl) && !normalizedExpectedMailboxEmail) {
await addLog('2925:当前邮箱页未跳转到登录页,将直接复用已登录会话。', 'info');
return buildSuccessPayload();
@@ -553,16 +563,6 @@
});
}
if (typeof ensureContentScriptReadyOnTab === 'function') {
await ensureContentScriptReadyOnTab(MAIL2925_SOURCE, tabId, {
inject: MAIL2925_INJECT,
injectSource: MAIL2925_INJECT_SOURCE,
timeoutMs: 20000,
retryDelayMs: 800,
logMessage: '步骤 0:2925 登录页内容脚本未就绪,正在等待页面稳定后继续登录...',
});
}
if (forceRelogin && typeof sleepWithStop === 'function') {
await addLog('2925:登录页已打开,等待 3 秒后开始检查输入框并执行登录...', 'info');
await sleepWithStop(3000);
-4
View File
@@ -69,10 +69,6 @@
}
function getExpectedMail2925MailboxEmail(state = {}) {
if (String(state?.mail2925Mode || '').trim().toLowerCase() === 'receive') {
return '';
}
if (Boolean(state?.mail2925UseAccountPool)) {
const currentAccountId = String(state?.currentMail2925AccountId || '').trim();
const accounts = Array.isArray(state?.mail2925Accounts) ? state.mail2925Accounts : [];
-4
View File
@@ -26,10 +26,6 @@
} = deps;
function getExpectedMail2925MailboxEmail(state = {}) {
if (String(state?.mail2925Mode || '').trim().toLowerCase() === 'receive') {
return '';
}
if (Boolean(state?.mail2925UseAccountPool)) {
const currentAccountId = String(state?.currentMail2925AccountId || '').trim();
const accounts = Array.isArray(state?.mail2925Accounts) ? state.mail2925Accounts : [];
+2 -1
View File
@@ -214,7 +214,8 @@
function getVerificationPollPayload(step, state, overrides = {}) {
const is2925Provider = state?.mailProvider === '2925';
const mail2925MatchTargetEmail = is2925Provider;
const mail2925MatchTargetEmail = is2925Provider
&& String(state?.mail2925Mode || '').trim().toLowerCase() === 'receive';
if (step === 4) {
return {
filterAfterTimestamp: is2925Provider ? 0 : getHotmailVerificationRequestTimestamp(4, state),