fix: 放开 2925 全模式目标邮箱匹配

- 让 2925 提供邮箱与接收邮箱模式都启用 targetEmail 弱匹配
- 同步更新轮询测试,验证 provide 与 receive 模式行为一致
This commit is contained in:
Isulew
2026-04-27 15:15:06 +08:00
parent b71bccaf8a
commit 941102200f
2 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -214,8 +214,7 @@
function getVerificationPollPayload(step, state, overrides = {}) { function getVerificationPollPayload(step, state, overrides = {}) {
const is2925Provider = state?.mailProvider === '2925'; const is2925Provider = state?.mailProvider === '2925';
const mail2925MatchTargetEmail = is2925Provider const mail2925MatchTargetEmail = is2925Provider;
&& String(state?.mail2925Mode || '').trim().toLowerCase() === 'receive';
if (step === 4) { if (step === 4) {
return { return {
filterAfterTimestamp: is2925Provider ? 0 : getHotmailVerificationRequestTimestamp(4, state), filterAfterTimestamp: is2925Provider ? 0 : getHotmailVerificationRequestTimestamp(4, state),
+2 -2
View File
@@ -43,7 +43,7 @@ test('verification flow keeps 2925 polling cadence in the default payload', () =
assert.equal(step8Payload.intervalMs, 15000); 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({ const helpers = api.createVerificationFlowHelpers({
addLog: async () => {}, addLog: async () => {},
chrome: { tabs: { update: async () => {} } }, chrome: { tabs: { update: async () => {} } },
@@ -82,7 +82,7 @@ test('verification flow only enables 2925 target email matching in receive mode'
mail2925Mode: 'receive', mail2925Mode: 'receive',
}); });
assert.equal(providePayload.mail2925MatchTargetEmail, false); assert.equal(providePayload.mail2925MatchTargetEmail, true);
assert.equal(receivePayload.mail2925MatchTargetEmail, true); assert.equal(receivePayload.mail2925MatchTargetEmail, true);
}); });