From 491d309a6f1afa8142f93c4524d55e568ece3263 Mon Sep 17 00:00:00 2001 From: QLHazyCoder <2825305047@qq.com> Date: Wed, 22 Apr 2026 21:52:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E9=82=AE=E7=AE=B1?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=88=B0=E8=B4=A1=E7=8C=AE=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E4=BD=93=EF=BC=8C=E5=B9=B6=E6=9B=B4=E6=96=B0=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- background/contribution-oauth.js | 1 + tests/background-contribution-mode.test.js | 1 + 2 files changed, 2 insertions(+) diff --git a/background/contribution-oauth.js b/background/contribution-oauth.js index 7dc5608..e95cbc3 100644 --- a/background/contribution-oauth.js +++ b/background/contribution-oauth.js @@ -599,6 +599,7 @@ body: { nickname: buildNickname(currentState, options.nickname), qq: buildContributionQq(currentState, options.qq), + email: normalizeString(currentState.email), source: 'cpa', channel: 'codex-extension', }, diff --git a/tests/background-contribution-mode.test.js b/tests/background-contribution-mode.test.js index b3d6901..67202c7 100644 --- a/tests/background-contribution-mode.test.js +++ b/tests/background-contribution-mode.test.js @@ -423,6 +423,7 @@ test('contribution oauth manager starts session, opens auth url, submits callbac assert.match(fetchCalls[0].url, /\/start$/); assert.match(String(fetchCalls[0].options.body || ''), /"nickname":""/); assert.match(String(fetchCalls[0].options.body || ''), /"qq":""/); + assert.match(String(fetchCalls[0].options.body || ''), /"email":"user@example\.com"/); assert.match(fetchCalls[1].url, /\/status\?/); const callbackState = await manager.handleCapturedCallback(