fix: sync third-party binding state in personal settings - #1916
Merged
Conversation
Contributor
WalkthroughBackend adds four ID fields to the GetSelf user response. Frontend PersonalSetting now imports and invokes setUserData after fetching current user data, in addition to dispatching the login action. No other control-flow or error handling changes are indicated. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant UI as PersonalSetting.jsx
participant API as /api/user/self
participant Store as Redux Store
participant Helpers as helpers.setUserData
User->>UI: Open Personal Settings
UI->>API: GET current user
API-->>UI: 200 OK + user { github_id, oidc_id, wechat_id, telegram_id, ... }
UI->>Store: dispatch(login(user))
UI->>Helpers: setUserData(user)
note right of UI: No changes to error handling/control flow otherwise
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
6 tasks
seefs001
approved these changes
Sep 29, 2025
x22x22
pushed a commit
to x22x22/new-api
that referenced
this pull request
Apr 24, 2026
fix: sync third-party binding state in personal settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 类型
PR 是否包含破坏性更新?
PR 描述
close #1914
修复个人设置页面中第三方绑定状态显示不一致的问题。后端接口
/api/user/self现在会返回各第三方账号的绑定 ID,前端在刷新用户信息时会同步写入 localStorage,确保绑定状态与实际一致。效果