webmail: in list of From address to use in compose window, don't add the catchall address

it was even selected by default.
This commit is contained in:
Mechiel Lukkien 2024-05-09 20:55:03 +02:00
parent 1fc8f165f7
commit 1a0a396713
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -2928,7 +2928,7 @@ const compose = (opts, listMailboxes) => {
return accountAddresses.find(a => a.Domain.ASCII === addr.Domain.ASCII && (a.User === '' || normalizeUser(a) === normalizeUser(addr))); return accountAddresses.find(a => a.Domain.ASCII === addr.Domain.ASCII && (a.User === '' || normalizeUser(a) === normalizeUser(addr)));
}; };
let haveFrom = false; let haveFrom = false;
const fromOptions = accountAddresses.map(a => { const fromOptions = accountAddresses.filter(a => a.User).map(a => {
const selected = opts.from && opts.from.length === 1 && equalAddress(a, opts.from[0]) || loginAddress && equalAddress(a, loginAddress) && (!opts.from || envelopeIdentity(opts.from)); const selected = opts.from && opts.from.length === 1 && equalAddress(a, opts.from[0]) || loginAddress && equalAddress(a, loginAddress) && (!opts.from || envelopeIdentity(opts.from));
const o = dom.option(formatAddress(a), selected ? attr.selected('') : []); const o = dom.option(formatAddress(a), selected ? attr.selected('') : []);
if (selected) { if (selected) {

View file

@ -1860,7 +1860,7 @@ const compose = (opts: ComposeOptions, listMailboxes: listMailboxes) => {
} }
let haveFrom = false let haveFrom = false
const fromOptions = accountAddresses.map(a => { const fromOptions = accountAddresses.filter(a => a.User).map(a => {
const selected = opts.from && opts.from.length === 1 && equalAddress(a, opts.from[0]) || loginAddress && equalAddress(a, loginAddress) && (!opts.from || envelopeIdentity(opts.from)) const selected = opts.from && opts.from.length === 1 && equalAddress(a, opts.from[0]) || loginAddress && equalAddress(a, loginAddress) && (!opts.from || envelopeIdentity(opts.from))
const o = dom.option(formatAddress(a), selected ? attr.selected('') : []) const o = dom.option(formatAddress(a), selected ? attr.selected('') : [])
if (selected) { if (selected) {