Comparing version 0.6.19 to 0.6.20
@@ -88,9 +88,5 @@ const debug = require('debug') ('sipware:headers') | ||
return { | ||
name, | ||
tag, | ||
domain: addr.domain, | ||
name, tag, domain: addr.domain, group, | ||
display_name: addr.name ? libmime.decodeWords(addr.name) : '', | ||
address: addr.address, | ||
addr: name + '@' + addr.domain, | ||
group, | ||
address: addr.address, addr: `${name}@${addr.domain}`, | ||
} | ||
@@ -108,8 +104,5 @@ }) | ||
return { | ||
name, | ||
tag, | ||
domain: addr.domain, | ||
name, tag, domain: addr.domain, | ||
display_name: addr.name ? libmime.decodeWords(addr.name) : '', | ||
address: addr.address, | ||
addr: name + '@' + addr.domain, | ||
address: addr.address, addr: `${name}@${addr.domain}`, | ||
} | ||
@@ -329,8 +322,10 @@ }, | ||
if(typeof groups[g] === 'string' || Array.isArray(groups[g])) { | ||
var group = this.parseAddrs(groups[g]); | ||
var addr = this.parseAddrs(groups[g]); | ||
} else { | ||
var group = groups[g]; | ||
var addr = groups[g]; | ||
} | ||
values.push(this.printSingleAddrs(group)); | ||
if(addr && addr.length) { | ||
values.push(`${this.encodeDisplayName(g)}: ${this.printSingleAddrs(addr.map(a => ({...a, group: undefined})))};`); | ||
} | ||
} | ||
@@ -363,3 +358,3 @@ } | ||
} else if (a.display_name) { | ||
values.push(this.encodeDisplayName(a.display_name) + ' <' + a.address + '>'); | ||
values.push(`${this.encodeDisplayName(a.display_name)} <${a.address}>`); | ||
} | ||
@@ -374,7 +369,7 @@ | ||
}) | ||
for(var grp in groups) { | ||
if(groups && groups[grp].length) { | ||
values.push(this.printSingleAddrs(groups[grp])); | ||
for(var g in groups) { | ||
if(groups[g] && groups[g].length) { | ||
values.push(`${this.encodeDisplayName(g)}: ${this.printSingleAddrs(groups[g].map(a => ({...a, group: undefined})))};`); | ||
} else { | ||
values.push(this.encodeDisplayName(grp) + ':;'); | ||
values.push(this.encodeDisplayName(g) + ':;'); | ||
} | ||
@@ -381,0 +376,0 @@ } |
@@ -67,3 +67,3 @@ { | ||
"optionalDependencies": {}, | ||
"version": "0.6.19", | ||
"version": "0.6.20", | ||
"directories": { | ||
@@ -70,0 +70,0 @@ "lib": "lib" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
126556
3079