mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 04:36:43 +00:00
Import/Export backend prep
This commit is contained in:
@ -359,14 +359,17 @@ func (u *User) GetAddressID(address string) (id string, err error) {
|
||||
u.lock.RLock()
|
||||
defer u.lock.RUnlock()
|
||||
|
||||
address = strings.ToLower(address)
|
||||
|
||||
if u.store == nil {
|
||||
err = errors.New("store is not initialised")
|
||||
return
|
||||
if u.store != nil {
|
||||
address = strings.ToLower(address)
|
||||
return u.store.GetAddressID(address)
|
||||
}
|
||||
|
||||
return u.store.GetAddressID(address)
|
||||
addresses := u.client().Addresses()
|
||||
pmapiAddress := addresses.ByEmail(address)
|
||||
if pmapiAddress != nil {
|
||||
return pmapiAddress.ID, nil
|
||||
}
|
||||
return "", errors.New("address not found")
|
||||
}
|
||||
|
||||
// GetBridgePassword returns bridge password. This is not a password of the PM
|
||||
|
||||
Reference in New Issue
Block a user