Apply new ESLint rules to legacy code
This commit is contained in:
parent
91cf075697
commit
8a2c17f65f
70 changed files with 376 additions and 516 deletions
|
@ -363,21 +363,24 @@ describe('Backup', () => {
|
|||
return attachment;
|
||||
}
|
||||
|
||||
return Object.assign({}, attachment, {
|
||||
return {
|
||||
...attachment,
|
||||
thumbnail: await mapper(attachment.thumbnail, context),
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
const quotedAttachments =
|
||||
(message.quote && message.quote.attachments) || [];
|
||||
|
||||
return Object.assign({}, message, {
|
||||
quote: Object.assign({}, message.quote, {
|
||||
return {
|
||||
...message,
|
||||
quote: {
|
||||
...message.quote,
|
||||
attachments: await Promise.all(
|
||||
quotedAttachments.map(wrappedMapper)
|
||||
),
|
||||
}),
|
||||
});
|
||||
},
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -391,17 +394,20 @@ describe('Backup', () => {
|
|||
return wrappedLoadAttachment(thumbnail);
|
||||
});
|
||||
|
||||
return Object.assign({}, await loadThumbnails(message), {
|
||||
return {
|
||||
...(await loadThumbnails(message)),
|
||||
contact: await Promise.all(
|
||||
(message.contact || []).map(async contact => {
|
||||
return contact && contact.avatar && contact.avatar.avatar
|
||||
? Object.assign({}, contact, {
|
||||
avatar: Object.assign({}, contact.avatar, {
|
||||
? {
|
||||
...contact,
|
||||
avatar: {
|
||||
...contact.avatar,
|
||||
avatar: await wrappedLoadAttachment(
|
||||
contact.avatar.avatar
|
||||
),
|
||||
}),
|
||||
})
|
||||
},
|
||||
}
|
||||
: contact;
|
||||
})
|
||||
),
|
||||
|
@ -429,7 +435,7 @@ describe('Backup', () => {
|
|||
return item;
|
||||
})
|
||||
),
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
let backupDir;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue