@bobfrankston/iflow 1.0.46 → 1.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/imaplib/imap-protocol.js +7 -5
- package/package.json +1 -1
package/imaplib/imap-protocol.js
CHANGED
|
@@ -340,11 +340,13 @@ function parseAddressList(token) {
|
|
|
340
340
|
if (!token || token === "NIL")
|
|
341
341
|
return [];
|
|
342
342
|
const addrs = [];
|
|
343
|
-
//
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
343
|
+
// Tokenize the outer list to get each address group as a paren-delimited token
|
|
344
|
+
// e.g. ((name NIL mailbox host)(name2 NIL mailbox2 host2)) → ["(name NIL mailbox host)", "(name2 ...)"]
|
|
345
|
+
const groups = tokenizeParenList(token);
|
|
346
|
+
for (const group of groups) {
|
|
347
|
+
if (!group.startsWith("("))
|
|
348
|
+
continue;
|
|
349
|
+
const parts = tokenizeParenList(group);
|
|
348
350
|
if (parts.length >= 4) {
|
|
349
351
|
const name = decodeImapString(unquote(parts[0]));
|
|
350
352
|
const mailbox = unquote(parts[2]);
|