mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Bugfix: addressparser() didn't handle groups properly
This commit is contained in:
parent
ebf429215b
commit
a696d6c0a1
4 changed files with 27 additions and 25 deletions
|
|
@ -5,15 +5,15 @@ const contentType = 'snappymail/emailaddress',
|
|||
getAddressKey = li => li?.emailaddress?.key,
|
||||
|
||||
parseEmailLine = line => addressparser(line).map(item =>
|
||||
(item.name || item.address)
|
||||
? new EmailModel(item.address, item.name) : null
|
||||
(item.name || item.email)
|
||||
? new EmailModel(item.email, item.name) : null
|
||||
).filter(v => v),
|
||||
splitEmailLine = line => {
|
||||
const result = [];
|
||||
let exists = false;
|
||||
addressparser(line).forEach(item => {
|
||||
const address = (item.name || item.address)
|
||||
? new EmailModel(item.address, item.name)
|
||||
const address = (item.name || item.email)
|
||||
? new EmailModel(item.email, item.name)
|
||||
: null;
|
||||
|
||||
if (address?.email) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue