mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 05:59:21 +03:00
Fix incorrect mailto format #1521
This commit is contained in:
parent
71718db8f0
commit
90a3d2b62a
5 changed files with 42 additions and 9 deletions
|
|
@ -1542,9 +1542,34 @@ export function mailToHelper(mailToUrl, PopupComposeViewModel)
|
|||
query = mailToUrl.replace(/^[^\?]*\?/, ''),
|
||||
EmailModel = require('Model/Email').default;
|
||||
|
||||
to = EmailModel.parseEmailLine(email);
|
||||
params = simpleQueryParser(query);
|
||||
|
||||
if (!isUnd(params.to))
|
||||
{
|
||||
to = EmailModel.parseEmailLine(decodeURIComponent(email + ',' + params.to));
|
||||
to = _.values(to.reduce((result, value) => {
|
||||
if (value)
|
||||
{
|
||||
if (result[value.email])
|
||||
{
|
||||
if (!result[value.email].name)
|
||||
{
|
||||
result[value.email] = value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result[value.email] = value;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}, {}));
|
||||
}
|
||||
else
|
||||
{
|
||||
to = EmailModel.parseEmailLine(email);
|
||||
}
|
||||
|
||||
if (!isUnd(params.cc))
|
||||
{
|
||||
cc = EmailModel.parseEmailLine(decodeURIComponent(params.cc));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue