mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Small fixes
This commit is contained in:
parent
278e98561d
commit
786873041f
8 changed files with 561 additions and 507 deletions
|
|
@ -247,7 +247,7 @@ class MessageModel extends AbstractModel
|
|||
this.bcc = emailArrayFromJson(json.Bcc);
|
||||
this.replyTo = emailArrayFromJson(json.ReplyTo);
|
||||
this.deliveredTo = emailArrayFromJson(json.DeliveredTo);
|
||||
this.unsubsribeLinks = json.UnsubsribeLinks;
|
||||
this.unsubsribeLinks = isNonEmptyArray(json.UnsubsribeLinks) ? json.UnsubsribeLinks : [];
|
||||
|
||||
this.subject(json.Subject);
|
||||
if (isArray(json.SubjectParts))
|
||||
|
|
@ -358,6 +358,20 @@ class MessageModel extends AbstractModel
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {boolean}
|
||||
*/
|
||||
hasUnsubsribeLinks() {
|
||||
return this.unsubsribeLinks && 0 < this.unsubsribeLinks.length;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
getFirstUnsubsribeLink() {
|
||||
return this.unsubsribeLinks && 0 < this.unsubsribeLinks.length ? (this.unsubsribeLinks[0] || '') : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {AjaxJsonMessage} json
|
||||
* @returns {boolean}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue