fix(teamsbot): credential save when form visible, add debugMode merge
Made-with: Cursor
This commit is contained in:
parent
294710b415
commit
24de648252
1 changed files with 4 additions and 2 deletions
|
|
@ -127,8 +127,10 @@ export const TeamsbotDashboardView: React.FC = () => {
|
|||
return;
|
||||
}
|
||||
|
||||
// userAccount with new credentials: always save to DB (backend loads from there)
|
||||
if (joinMode === 'userAccount' && showCredentialForm && credEmail && credPassword) {
|
||||
// userAccount with new/unsaved credentials: save to DB before starting
|
||||
const needsSave = joinMode === 'userAccount' && !userAccount?.hasSavedCredentials && credEmail && credPassword;
|
||||
const needsUpdate = joinMode === 'userAccount' && showCredentialForm && credEmail && credPassword;
|
||||
if (needsSave || needsUpdate) {
|
||||
try {
|
||||
setSavingCredentials(true);
|
||||
await teamsbotApi.saveUserAccount(instanceId, credEmail, credPassword);
|
||||
|
|
|
|||
Loading…
Reference in a new issue