mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-09 06:28:28 +03: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);
|
||||
|
||||
|
|
@ -66,7 +67,7 @@ function MessageModel()
|
|||
}
|
||||
return sClass;
|
||||
}, this);
|
||||
|
||||
|
||||
this.fullFormatDateValue = ko.computed(function () {
|
||||
return MessageModel.calculateFullFromatDateValue(this.dateTimeStampInUTC());
|
||||
}, this);
|
||||
|
|
@ -102,7 +103,7 @@ function MessageModel()
|
|||
this.sMessageId = '';
|
||||
this.sInReplyTo = '';
|
||||
this.sReferences = '';
|
||||
|
||||
|
||||
this.parentUid = ko.observable(0);
|
||||
this.threads = ko.observableArray([]);
|
||||
this.threadsLen = ko.observable(0);
|
||||
|
|
@ -111,7 +112,7 @@ function MessageModel()
|
|||
|
||||
this.lastInCollapsedThread = ko.observable(false);
|
||||
this.lastInCollapsedThreadLoading = ko.observable(false);
|
||||
|
||||
|
||||
this.threadsLenResult = ko.computed(function () {
|
||||
var iCount = this.threadsLen();
|
||||
return 0 === this.parentUid() && 0 < iCount ? iCount + 1 : '';
|
||||
|
|
@ -242,6 +243,7 @@ MessageModel.prototype.clear = function ()
|
|||
this.cc = [];
|
||||
this.bcc = [];
|
||||
this.replyTo = [];
|
||||
this.deliveredTo = [];
|
||||
|
||||
this.newForAnimation(false);
|
||||
|
||||
|
|
@ -262,7 +264,7 @@ MessageModel.prototype.clear = function ()
|
|||
this.isHtml(false);
|
||||
this.hasImages(false);
|
||||
this.attachments([]);
|
||||
|
||||
|
||||
this.isPgpSigned(false);
|
||||
this.isPgpEncrypted(false);
|
||||
this.pgpSignedVerifyStatus(Enums.SignedVerifyStatus.None);
|
||||
|
|
@ -309,7 +311,7 @@ MessageModel.prototype.initByJson = function (oJsonMessage)
|
|||
this.uid = oJsonMessage.Uid;
|
||||
this.hash = oJsonMessage.Hash;
|
||||
this.requestHash = oJsonMessage.RequestHash;
|
||||
|
||||
|
||||
this.size(Utils.pInt(oJsonMessage.Size));
|
||||
|
||||
this.from = MessageModel.initEmailsFromJson(oJsonMessage.From);
|
||||
|
|
@ -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));
|
||||
|
|
@ -332,7 +335,7 @@ MessageModel.prototype.initByJson = function (oJsonMessage)
|
|||
|
||||
this.initFlagsByJson(oJsonMessage);
|
||||
this.computeSenderEmail();
|
||||
|
||||
|
||||
bResult = true;
|
||||
}
|
||||
|
||||
|
|
@ -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());
|
||||
|
|
@ -907,7 +911,7 @@ MessageModel.prototype.showInternalImages = function (bLazy)
|
|||
bLazy = Utils.isUnd(bLazy) ? false : bLazy;
|
||||
|
||||
var self = this;
|
||||
|
||||
|
||||
$('[data-x-src-cid]', this.body).each(function () {
|
||||
|
||||
var oAttachment = self.findAttachmentByCid($(this).attr('data-x-src-cid'));
|
||||
|
|
@ -925,7 +929,7 @@ MessageModel.prototype.showInternalImages = function (bLazy)
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('[data-x-src-location]', this.body).each(function () {
|
||||
|
||||
var oAttachment = self.findAttachmentByContentLocation($(this).attr('data-x-src-location'));
|
||||
|
|
@ -933,7 +937,7 @@ MessageModel.prototype.showInternalImages = function (bLazy)
|
|||
{
|
||||
oAttachment = self.findAttachmentByCid($(this).attr('data-x-src-location'));
|
||||
}
|
||||
|
||||
|
||||
if (oAttachment && oAttachment.download)
|
||||
{
|
||||
if (bLazy && $(this).is('img'))
|
||||
|
|
@ -1023,7 +1027,7 @@ MessageModel.prototype.fetchDataToDom = function ()
|
|||
this.isRtl(!!this.body.data('rl-is-rtl'));
|
||||
this.isHtml(!!this.body.data('rl-is-html'));
|
||||
this.hasImages(!!this.body.data('rl-has-images'));
|
||||
|
||||
|
||||
this.plainRaw = Utils.pString(this.body.data('rl-plain-raw'));
|
||||
|
||||
if (RL.data().capaOpenPGP())
|
||||
|
|
@ -1081,7 +1085,7 @@ MessageModel.prototype.verifyPgpSignedClearMessage = function ()
|
|||
if (oValidSysKey)
|
||||
{
|
||||
sPlain = mPgpMessage.getText();
|
||||
|
||||
|
||||
this.pgpSignedVerifyStatus(Enums.SignedVerifyStatus.Success);
|
||||
this.pgpSignedVerifyUser(oValidSysKey.user);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue