Switch back to using upstream email-address library (#998)

This commit is contained in:
Ilya Chesnokov
2019-10-25 14:25:03 +03:00
committed by Daniel Huigens
parent 810b8daab2
commit 528fbfb017
3 changed files with 5 additions and 4 deletions

View File

@@ -677,7 +677,7 @@ export default {
throw new Error('User id string is too long');
}
try {
const { name, address: email, comments } = emailAddresses.parseOneAddress(userid);
const { name, address: email, comments } = emailAddresses.parseOneAddress({ input: userid, atInDisplayName: true });
return { name, email, comment: comments.replace(/^\(|\)$/g, '') };
} catch(e) {
throw new Error('Invalid user id format');