forked from Silverfish/proton-bridge
Import/Export final touches
This commit is contained in:
@ -34,7 +34,7 @@ const (
|
||||
sep = "\x00"
|
||||
|
||||
itemLengthBridge = 9
|
||||
itemLengthImportExport = 6 // Old format for Import/Export.
|
||||
itemLengthImportExport = 6 // Old format for Import-Export.
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@ -299,12 +299,11 @@ func (u *Users) addNewUser(apiUser *pmapi.User, auth *pmapi.Auth, hashedPassphra
|
||||
return errors.Wrap(err, "failed to update API user")
|
||||
}
|
||||
|
||||
emails := []string{}
|
||||
for _, address := range client.Addresses() {
|
||||
if u.useOnlyActiveAddresses && address.Receive != pmapi.CanReceive {
|
||||
continue
|
||||
}
|
||||
emails = append(emails, address.Email)
|
||||
var emails []string //nolint[prealloc]
|
||||
if u.useOnlyActiveAddresses {
|
||||
emails = client.Addresses().ActiveEmails()
|
||||
} else {
|
||||
emails = client.Addresses().AllEmails()
|
||||
}
|
||||
|
||||
if _, err = u.credStorer.Add(apiUser.ID, apiUser.Name, auth.GenToken(), hashedPassphrase, emails); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user