feat(GODT-2346): treat external address as disabled one.

This commit is contained in:
Romain LE JEUNE
2023-05-05 16:07:01 +02:00
committed by Romain Le Jeune
parent ad02c71ad6
commit bda158d6c6
4 changed files with 23 additions and 4 deletions

View File

@ -282,7 +282,7 @@ func (user *User) Match(query string) bool {
func (user *User) Emails() []string {
return safe.RLockRet(func() []string {
addresses := xslices.Filter(maps.Values(user.apiAddrs), func(addr proton.Address) bool {
return addr.Status == proton.AddressStatusEnabled
return addr.Status == proton.AddressStatusEnabled && addr.Type != proton.AddressTypeExternal
})
slices.SortFunc(addresses, func(a, b proton.Address) bool {