From 941102200fe2e96ec05102e465294bd3b2457e0a Mon Sep 17 00:00:00 2001 From: Isulew <224964+netcookies@users.noreply.github.com> Date: Mon, 27 Apr 2026 15:15:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=BE=E5=BC=80=202925=20=E5=85=A8?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E7=9B=AE=E6=A0=87=E9=82=AE=E7=AE=B1=E5=8C=B9?= =?UTF-8?q?=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 让 2925 提供邮箱与接收邮箱模式都启用 targetEmail 弱匹配 - 同步更新轮询测试,验证 provide 与 receive 模式行为一致 --- background/verification-flow.js | 3 +-- tests/verification-flow-polling.test.js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/background/verification-flow.js b/background/verification-flow.js index 229bed7..84bdfb5 100644 --- a/background/verification-flow.js +++ b/background/verification-flow.js @@ -214,8 +214,7 @@ function getVerificationPollPayload(step, state, overrides = {}) { const is2925Provider = state?.mailProvider === '2925'; - const mail2925MatchTargetEmail = is2925Provider - && String(state?.mail2925Mode || '').trim().toLowerCase() === 'receive'; + const mail2925MatchTargetEmail = is2925Provider; if (step === 4) { return { filterAfterTimestamp: is2925Provider ? 0 : getHotmailVerificationRequestTimestamp(4, state), diff --git a/tests/verification-flow-polling.test.js b/tests/verification-flow-polling.test.js index 426b828..d241d93 100644 --- a/tests/verification-flow-polling.test.js +++ b/tests/verification-flow-polling.test.js @@ -43,7 +43,7 @@ test('verification flow keeps 2925 polling cadence in the default payload', () = assert.equal(step8Payload.intervalMs, 15000); }); -test('verification flow only enables 2925 target email matching in receive mode', () => { +test('verification flow enables 2925 target email matching in both provide and receive modes', () => { const helpers = api.createVerificationFlowHelpers({ addLog: async () => {}, chrome: { tabs: { update: async () => {} } }, @@ -82,7 +82,7 @@ test('verification flow only enables 2925 target email matching in receive mode' mail2925Mode: 'receive', }); - assert.equal(providePayload.mail2925MatchTargetEmail, false); + assert.equal(providePayload.mail2925MatchTargetEmail, true); assert.equal(receivePayload.mail2925MatchTargetEmail, true); });