imapflow 1.0.151 → 1.0.152

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.0.152](https://github.com/postalsys/imapflow/compare/v1.0.151...v1.0.152) (2024-02-12)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **address:** do not use '@' instead of empyt address if a field does not contain a value ([aeabbde](https://github.com/postalsys/imapflow/commit/aeabbded3bf3c6ba7266f79d4bc001980644da0d))
9
+
3
10
  ## [1.0.151](https://github.com/postalsys/imapflow/compare/v1.0.150...v1.0.151) (2024-02-12)
4
11
 
5
12
 
package/lib/tools.js CHANGED
@@ -423,10 +423,19 @@ module.exports = {
423
423
  };
424
424
 
425
425
  let processAddresses = function (list) {
426
- return [].concat(list || []).map(addr => ({
427
- name: module.exports.processName(libmime.decodeWords(getStrValue(addr[0]))),
428
- address: (getStrValue(addr[2]) || '') + '@' + (getStrValue(addr[3]) || '')
429
- }));
426
+ return []
427
+ .concat(list || [])
428
+ .map(addr => {
429
+ let address = (getStrValue(addr[2]) || '') + '@' + (getStrValue(addr[3]) || '');
430
+ if (address === '@') {
431
+ address = '';
432
+ }
433
+ return {
434
+ name: module.exports.processName(libmime.decodeWords(getStrValue(addr[0]))),
435
+ address
436
+ };
437
+ })
438
+ .filter(addr => addr.name || addr.address);
430
439
  },
431
440
  envelope = {};
432
441
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imapflow",
3
- "version": "1.0.151",
3
+ "version": "1.0.152",
4
4
  "description": "IMAP Client for Node",
5
5
  "main": "./lib/imap-flow.js",
6
6
  "scripts": {