mirror of
https://github.com/mjl-/mox.git
synced 2025-06-28 12:18:16 +03:00
webmail: show email address instead of display name of "from" header in message listing if display name contains chars from "<@>"
it could be an attempt to confuse the reader with an email address. a classic.
This commit is contained in:
parent
725f030d3c
commit
f7686b7db8
@ -316,10 +316,11 @@ const formatAddressFull = (a: api.MessageAddress): string => {
|
|||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
// format just the name, or otherwies just the email address.
|
// format just the name if present and it doesn't look like an address, or otherwise just the email address.
|
||||||
const formatAddressShort = (a: api.MessageAddress): string => {
|
const formatAddressShort = (a: api.MessageAddress): string => {
|
||||||
if (a.Name) {
|
const n = a.Name
|
||||||
return a.Name
|
if (n && !n.includes('<') && !n.includes('@') && !n.includes('>')) {
|
||||||
|
return n
|
||||||
}
|
}
|
||||||
return '<' + a.User + '@' + a.Domain.ASCII + '>'
|
return '<' + a.User + '@' + a.Domain.ASCII + '>'
|
||||||
}
|
}
|
||||||
|
@ -959,10 +959,11 @@ const formatAddressFull = (a) => {
|
|||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
};
|
};
|
||||||
// format just the name, or otherwies just the email address.
|
// format just the name if present and it doesn't look like an address, or otherwise just the email address.
|
||||||
const formatAddressShort = (a) => {
|
const formatAddressShort = (a) => {
|
||||||
if (a.Name) {
|
const n = a.Name;
|
||||||
return a.Name;
|
if (n && !n.includes('<') && !n.includes('@') && !n.includes('>')) {
|
||||||
|
return n;
|
||||||
}
|
}
|
||||||
return '<' + a.User + '@' + a.Domain.ASCII + '>';
|
return '<' + a.User + '@' + a.Domain.ASCII + '>';
|
||||||
};
|
};
|
||||||
|
@ -959,10 +959,11 @@ const formatAddressFull = (a) => {
|
|||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
};
|
};
|
||||||
// format just the name, or otherwies just the email address.
|
// format just the name if present and it doesn't look like an address, or otherwise just the email address.
|
||||||
const formatAddressShort = (a) => {
|
const formatAddressShort = (a) => {
|
||||||
if (a.Name) {
|
const n = a.Name;
|
||||||
return a.Name;
|
if (n && !n.includes('<') && !n.includes('@') && !n.includes('>')) {
|
||||||
|
return n;
|
||||||
}
|
}
|
||||||
return '<' + a.User + '@' + a.Domain.ASCII + '>';
|
return '<' + a.User + '@' + a.Domain.ASCII + '>';
|
||||||
};
|
};
|
||||||
|
@ -959,10 +959,11 @@ const formatAddressFull = (a) => {
|
|||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
};
|
};
|
||||||
// format just the name, or otherwies just the email address.
|
// format just the name if present and it doesn't look like an address, or otherwise just the email address.
|
||||||
const formatAddressShort = (a) => {
|
const formatAddressShort = (a) => {
|
||||||
if (a.Name) {
|
const n = a.Name;
|
||||||
return a.Name;
|
if (n && !n.includes('<') && !n.includes('@') && !n.includes('>')) {
|
||||||
|
return n;
|
||||||
}
|
}
|
||||||
return '<' + a.User + '@' + a.Domain.ASCII + '>';
|
return '<' + a.User + '@' + a.Domain.ASCII + '>';
|
||||||
};
|
};
|
||||||
|
@ -1744,7 +1744,7 @@ interface MsgitemView {
|
|||||||
// Sub messages in thread. Can be further descendants, when an intermediate message
|
// Sub messages in thread. Can be further descendants, when an intermediate message
|
||||||
// is missing.
|
// is missing.
|
||||||
kids: MsgitemView[]
|
kids: MsgitemView[]
|
||||||
// Whether this thread root is collapsed. If so, the root is visible, all descedants
|
// Whether this thread root is collapsed. If so, the root is visible, all descendants
|
||||||
// are not. Value is only valid if this is a thread root.
|
// are not. Value is only valid if this is a thread root.
|
||||||
collapsed: boolean
|
collapsed: boolean
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user