mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-09-11 23:54:15 +08:00
Check "Delivered-To" for identities (Closes #160)
This commit is contained in:
parent
fed896776f
commit
2f074433a2
7 changed files with 105 additions and 80 deletions
|
@ -25,6 +25,7 @@ function MessageModel()
|
|||
this.cc = [];
|
||||
this.bcc = [];
|
||||
this.replyTo = [];
|
||||
this.deliveredTo = [];
|
||||
|
||||
this.newForAnimation = ko.observable(false);
|
||||
|
||||
|
@ -242,6 +243,7 @@ MessageModel.prototype.clear = function ()
|
|||
this.cc = [];
|
||||
this.bcc = [];
|
||||
this.replyTo = [];
|
||||
this.deliveredTo = [];
|
||||
|
||||
this.newForAnimation(false);
|
||||
|
||||
|
@ -317,6 +319,7 @@ MessageModel.prototype.initByJson = function (oJsonMessage)
|
|||
this.cc = MessageModel.initEmailsFromJson(oJsonMessage.Cc);
|
||||
this.bcc = MessageModel.initEmailsFromJson(oJsonMessage.Bcc);
|
||||
this.replyTo = MessageModel.initEmailsFromJson(oJsonMessage.ReplyTo);
|
||||
this.deliveredTo = MessageModel.initEmailsFromJson(oJsonMessage.DeliveredTo);
|
||||
|
||||
this.subject(oJsonMessage.Subject);
|
||||
this.dateTimeStampInUTC(Utils.pInt(oJsonMessage.DateTimeStampInUTC));
|
||||
|
@ -814,6 +817,7 @@ MessageModel.prototype.populateByMessageListItem = function (oMessage)
|
|||
this.cc = oMessage.cc;
|
||||
this.bcc = oMessage.bcc;
|
||||
this.replyTo = oMessage.replyTo;
|
||||
this.deliveredTo = oMessage.deliveredTo;
|
||||
|
||||
this.unseen(oMessage.unseen());
|
||||
this.flagged(oMessage.flagged());
|
||||
|
|
|
@ -437,7 +437,7 @@ PopupsComposeViewModel.prototype.findIdentityIdByMessage = function (sComposeTyp
|
|||
case Enums.ComposeType.ReplyAll:
|
||||
case Enums.ComposeType.Forward:
|
||||
case Enums.ComposeType.ForwardAsAttachment:
|
||||
_.find(_.union(oMessage.to, oMessage.cc, oMessage.bcc), fFindHelper);
|
||||
_.find(_.union(oMessage.to, oMessage.cc, oMessage.bcc, oMessage.deliveredTo), fFindHelper);
|
||||
break;
|
||||
case Enums.ComposeType.Draft:
|
||||
_.find(_.union(oMessage.from, oMessage.replyTo), fFindHelper);
|
||||
|
|
|
@ -78,6 +78,11 @@ class Message
|
|||
*/
|
||||
private $oReplyTo;
|
||||
|
||||
/**
|
||||
* @var \MailSo\Mime\EmailCollection
|
||||
*/
|
||||
private $oDeliveredTo;
|
||||
|
||||
/**
|
||||
* @var \MailSo\Mime\EmailCollection
|
||||
*/
|
||||
|
@ -201,6 +206,7 @@ class Message
|
|||
$this->oFrom = null;
|
||||
$this->oSender = null;
|
||||
$this->oReplyTo = null;
|
||||
$this->oDeliveredTo = null;
|
||||
$this->oTo = null;
|
||||
$this->oCc = null;
|
||||
$this->oBcc = null;
|
||||
|
@ -416,6 +422,14 @@ class Message
|
|||
return $this->oReplyTo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \MailSo\Mime\EmailCollection
|
||||
*/
|
||||
public function DeliveredTo()
|
||||
{
|
||||
return $this->oDeliveredTo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \MailSo\Mime\EmailCollection
|
||||
*/
|
||||
|
@ -621,6 +635,7 @@ class Message
|
|||
|
||||
$this->oSender = $oHeaders->GetAsEmailCollection(\MailSo\Mime\Enumerations\Header::SENDER, $bCharsetAutoDetect);
|
||||
$this->oReplyTo = $oHeaders->GetAsEmailCollection(\MailSo\Mime\Enumerations\Header::REPLY_TO, $bCharsetAutoDetect);
|
||||
$this->oDeliveredTo = $oHeaders->GetAsEmailCollection(\MailSo\Mime\Enumerations\Header::DELIVERED_TO, $bCharsetAutoDetect);
|
||||
|
||||
$this->sInReplyTo = $oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::IN_REPLY_TO);
|
||||
$this->sReferences = $oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::REFERENCES);
|
||||
|
|
|
@ -21,6 +21,7 @@ class Header
|
|||
const REPLY_TO = 'Reply-To';
|
||||
const SENDER = 'Sender';
|
||||
const RETURN_PATH = 'Return-Path';
|
||||
const DELIVERED_TO = 'Delivered-To';
|
||||
|
||||
const MESSAGE_ID = 'Message-ID';
|
||||
const IN_REPLY_TO = 'In-Reply-To';
|
||||
|
|
|
@ -6081,7 +6081,7 @@ class Actions
|
|||
|
||||
$aResult = array(
|
||||
\RainLoop\Enumerations\Capa::PREM,
|
||||
\RainLoop\Enumerations\Capa::FILTERS
|
||||
// \RainLoop\Enumerations\Capa::FILTERS
|
||||
);
|
||||
|
||||
if ($oConfig->Get('webmail', 'allow_additional_accounts', false))
|
||||
|
@ -6989,6 +6989,7 @@ class Actions
|
|||
'Cc' => $this->responseObject($mResponse->Cc(), $sParent, $aParameters),
|
||||
'Bcc' => $this->responseObject($mResponse->Bcc(), $sParent, $aParameters),
|
||||
'Sender' => $this->responseObject($mResponse->Sender(), $sParent, $aParameters),
|
||||
'DeliveredTo' => $this->responseObject($mResponse->DeliveredTo(), $sParent, $aParameters),
|
||||
'Priority' => $mResponse->Priority(),
|
||||
'Threads' => $mResponse->Threads(),
|
||||
'ThreadsLen' => $mResponse->ThreadsLen(),
|
||||
|
|
|
@ -6502,6 +6502,7 @@ function MessageModel()
|
|||
this.cc = [];
|
||||
this.bcc = [];
|
||||
this.replyTo = [];
|
||||
this.deliveredTo = [];
|
||||
|
||||
this.newForAnimation = ko.observable(false);
|
||||
|
||||
|
@ -6719,6 +6720,7 @@ MessageModel.prototype.clear = function ()
|
|||
this.cc = [];
|
||||
this.bcc = [];
|
||||
this.replyTo = [];
|
||||
this.deliveredTo = [];
|
||||
|
||||
this.newForAnimation(false);
|
||||
|
||||
|
@ -6794,6 +6796,7 @@ MessageModel.prototype.initByJson = function (oJsonMessage)
|
|||
this.cc = MessageModel.initEmailsFromJson(oJsonMessage.Cc);
|
||||
this.bcc = MessageModel.initEmailsFromJson(oJsonMessage.Bcc);
|
||||
this.replyTo = MessageModel.initEmailsFromJson(oJsonMessage.ReplyTo);
|
||||
this.deliveredTo = MessageModel.initEmailsFromJson(oJsonMessage.DeliveredTo);
|
||||
|
||||
this.subject(oJsonMessage.Subject);
|
||||
this.dateTimeStampInUTC(Utils.pInt(oJsonMessage.DateTimeStampInUTC));
|
||||
|
@ -7291,6 +7294,7 @@ MessageModel.prototype.populateByMessageListItem = function (oMessage)
|
|||
this.cc = oMessage.cc;
|
||||
this.bcc = oMessage.bcc;
|
||||
this.replyTo = oMessage.replyTo;
|
||||
this.deliveredTo = oMessage.deliveredTo;
|
||||
|
||||
this.unseen(oMessage.unseen());
|
||||
this.flagged(oMessage.flagged());
|
||||
|
@ -8889,7 +8893,7 @@ PopupsComposeViewModel.prototype.findIdentityIdByMessage = function (sComposeTyp
|
|||
case Enums.ComposeType.ReplyAll:
|
||||
case Enums.ComposeType.Forward:
|
||||
case Enums.ComposeType.ForwardAsAttachment:
|
||||
_.find(_.union(oMessage.to, oMessage.cc, oMessage.bcc), fFindHelper);
|
||||
_.find(_.union(oMessage.to, oMessage.cc, oMessage.bcc, oMessage.deliveredTo), fFindHelper);
|
||||
break;
|
||||
case Enums.ComposeType.Draft:
|
||||
_.find(_.union(oMessage.from, oMessage.replyTo), fFindHelper);
|
||||
|
|
12
rainloop/v/0.0.0/static/js/app.min.js
vendored
12
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue