mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-09 17:37:02 +03:00
cidWithOutTags => cidWithoutTags and don't check foundedCIDs because isLinked is already set
This commit is contained in:
parent
6d5317d969
commit
46198861bc
2 changed files with 7 additions and 7 deletions
|
|
@ -9,15 +9,12 @@ export class AttachmentCollectionModel extends AbstractCollectionModel
|
|||
* @param {?Array} json
|
||||
* @returns {AttachmentCollectionModel}
|
||||
*/
|
||||
static reviveFromJson(items, foundedCIDs) {
|
||||
static reviveFromJson(items) {
|
||||
let result = new AttachmentCollectionModel;
|
||||
items = this.getFromJSON(items, 'AttachmentCollection') || items;
|
||||
Array.isArray(items) && items.forEach(attachment => {
|
||||
attachment = AttachmentModel.newInstanceFromJson(attachment);
|
||||
if (attachment) {
|
||||
if (attachment.cidWithOutTags && foundedCIDs.includes(attachment.cidWithOutTags)) {
|
||||
attachment.isLinked = true;
|
||||
}
|
||||
result.push(attachment);
|
||||
}
|
||||
});
|
||||
|
|
@ -37,6 +34,6 @@ export class AttachmentCollectionModel extends AbstractCollectionModel
|
|||
*/
|
||||
findByCid(cid) {
|
||||
cid = cid.replace(/^<+|>+$/, '');
|
||||
return this.find(item => cid === item.cidWithOutTags);
|
||||
return this.find(item => cid === item.cidWithoutTags);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue