mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 05:06:51 +00:00
Other: added user's primary email address to the vault.
This commit is contained in:
@ -147,7 +147,12 @@ func migrateOldAccount(userID string, store *credentials.Store, v *vault.Vault)
|
||||
return fmt.Errorf("failed to split api token for user %q: %w", userID, err)
|
||||
}
|
||||
|
||||
user, err := v.AddUser(creds.UserID, creds.Name, authUID, authRef, creds.MailboxPassword)
|
||||
var primaryEmail string
|
||||
if len(creds.EmailList()) > 0 {
|
||||
primaryEmail = creds.EmailList()[0]
|
||||
}
|
||||
|
||||
user, err := v.AddUser(creds.UserID, creds.Name, primaryEmail, authUID, authRef, creds.MailboxPassword)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to add user %q: %w", userID, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user